PHILADELPHIA — The Nutter administration and City Councilman James Kenney have reached a compromise on a bill that will reduce penalties for possession of marijuana in Philadelphia.

The compromise calls for a separate offense — and penalty — for public use of the drug. Those who are caught using marijuana in public would be charged with a noncriminal summary offense, and would face a $100 fine or up to nine hours of community service, according to Kenney.

People caught possessing fewer than 30 grams of marijuana, or just over an ounce, would be issued a citation and fined $25.

In neither case — possession of fewer than 30 grams, or public use — would an offender face a criminal charge or arrest.

The compromise appears to end what has been a somewhat vitriolic conflict between Kenney and Nutter following City Council's 13-to-3 vote in June to pass Kenney's bill substantially lessening the penalties for possessing small amounts of marijuana.

Nutter, declining to immediately sign the legislation, said it was "simplistic" and did not do enough to address other issues raised by the drug's use.

Council's summer break gave the mayor extra time to consider whether he would sign the measure. But this week, with the deadline for his signature approaching, Kenney's office and the administration have been meeting to hammer out a compromise.

Nutter said Police Commissioner Charles H. Ramsey, who had been a critic of the original bill, was part of the discussions that led to the compromise.

Ramsey said Monday that he has been assured by the city's law department that the city has the ability to enact its own statute treating possession of marijuana as a noncriminal offense. Possession remains a criminal offense under state law.

The chief change in the compromise bill is the additional charge of public smoking of the drug. Nutter had been concerned that under the original bill police would have little ability to stop public use of the drug, and that would send a message that drug use was acceptable behavior.

A new bill, reflecting the compromise between Kenney and the mayor, is to be introduced Thursday when Council returns from its summer break. Assuming it is passed by Council and signed by the mayor, the compromise bill could become law Oct. 20.

The deal paves the way for Philadelphia to join a trend. To date, 21 states and the District of Columbia have enacted measures legalizing some form of marijuana use, according to Governing magazine, which tracks laws.

Colorado and Washington state have legalized recreational use, while the others allow pot for medical reasons. New Jersey permits medical-marijuana use. Pennsylvania's is one of several state legislatures with measures pending that would legalize marijuana.