The time it took to reach a compromise on marijuana arrests in Philadelphia was worth it. It should lead to a dramatic reduction in the thousands saddled with debilitating criminal records for possessing small amounts of the drug for recreational use.

That will be particularly important in the city's African American community, which, as the legislation's sponsor, Councilman Jim Kenney, pointed out has been inordinately targeted for marijuana arrests.

Kenney questioned why fraternity boys and tailgaters at Eagles games weren't arrested as often. Last year, 83 percent of the 4,000 people arrested in the city were black, even though studies show marijuana usage runs evenly among racial groups.

Even as he acknowledged that discrepancy, Mayor Nutter would not initially sign Kenney's bill when Council passed it in June. But he and Kenney ironed out their differences, leading to the landmark compromise bill passed last week, which becomes effective on Oct. 20.

The new law calls for those caught with less than 30 grams, or about an ounce, of marijuana to be fined $25. However, smoking marijuana in public carries a $100 fine or nine hours of community service. Nutter wanted the stiffer penalty for public use.

The approach makes sense. While marijuana use does carry some apparently minor health risks, treating recreational marijuana users like drug lords went overboard. Criminal records stemming from pot busts have kept thousands of young people from obtaining student loans, joining the military, or getting jobs.

Give credit to city District Attorney Seth Williams for blazing the trail to the new law. Four years ago, he announced he wouldn't seek jail time for possession of small amounts of marijuana, noting that those cases added stress to the already overloaded judicial system.

Police Commissioner Charles H. Ramsey, who reacted negatively to Kenney's original bill making marijuana possession the equivalent of a ticketed offense, says he's on board with the revised law. The compromise doesn't prohibit some cases from being prosecuted under the state's more stringent marijuana statute, which brands users with a criminal record, a $500 fine, and up to 30 days in jail.

The city's new law puts Philadelphia where it belongs, among the more progressive parts of the country. So far, 21 states and the District of Columbia have downgraded marijuana charges or legalized it to some extent. New Jersey has legalized marijuana for medical use. That's a step that Pennsylvania, which has a medical marijauna bill in the legislature, should also take.

The city's new marijuana law is proof that Nutter and Council can compromise, which doesn't happen often enough. By putting aside politics and working together, they have written groundbreaking legislation that protects the public while recognizing today's realities.