The City Council on Wednesday passed a sweeping overhaul of punishments for low-level offenses such as public urination, taking a step toward what Speaker Melissa Mark-Viverito envisioned as “a city where penalties fit the crime.”

The Criminal Justice Reform Act would, among other actions, steer alleged offenders to a civil tribunal rather than a criminal court and establish civil penalty schemes.

Each of its eight components passed with at least 39 votes from the 51-member council.

The quality-of-life crimes covered also include drinking alcohol in public and violating Department of Parks rules such as being in a park after hours.

The bills — a compromise between the council, Mayor Bill de Blasio’s office and the NYPD — still give police officers the discretion to issue a criminal summons or make an arrest.

“Too many New Yorkers were paying too high a price for minor offenses,” Mark-Viverito (D-East Harlem) said. “We need to put the ‘justice’ back in our justice system.”

Council opponents included Minority Leader Steven Matteo (R-Staten Island), who said, “We don’t want people to think it’s OK to urinate in public. We want there to be real consequences.” Nonetheless, he commended the “respectful debate” that had led to the final version.

The vote was the culmination of 15 months of collaboration.

advertisement | advertise on newsday

By diverting at least 100,000 cases from criminal courts annually, tens of thousands fewer warrants will be issued and police will be freed up to pursue more serious crime, council aides said. The changes would cost $8.5 million for the first year — in part to build up the city’s Office of Administrative Trials and Hearings — and $3.1 million for subsequent years.

The chair of the council’s public safety committee, Vanessa Gibson (D-Bronx), stressed that the bills don’t decriminalize any offenses — a misconception that sponsors fought early on.

“What is illegal yesterday will remain illegal today and it will be illegal tomorrow,” Gibson said.

NYPD Commissioner William Bratton at a separate Manhattan event Wednesday voiced approval, though he has spearheaded the “broken windows” policing approach of targeting low-level crimes.

“I got what I wanted for my officers: They retain the right in every instance to make an arrest, if appropriate,” he said.

De Blasio, who is expected to sign the bills, said the legislation encourages a “fairer criminal justice system, fewer unnecessary arrests and increasingly safe streets.”

With Anthony M. DeStefano