The city’s bizarre disciplinary system that pays teachers accused of misconduct for months and years on end for doing nothing is being expelled.

Mayor Bloomberg announced a “breakthrough” agreement with the United Federation of Teachers today that’s designed to clear a backlog of more than 600 cases by year’s end and shutter the eight teacher reassignment centers known as “rubber rooms” on the last day of school in June.

The deal will force most educators accused of misdeeds to work for their earnings in district offices or in non-teaching roles in schools until their cases are resolved.

Those accused of more serious sexual or financial misconduct would be sent home with pay rather than be given administrative duty, while those charged with felony offenses in criminal court would be removed from their schools without pay.

“Given the amount of press that this subject has gotten, to say that this is a big deal is probably an understatement,” said Bloomberg.

The Post has campaigned against rubber rooms for months.

Columnist Andrea Peyser wrote in February, “Rubber rooms have become the symbol of everything in city government that makes one’s head want to explode. These oases of waste and neglect exist in all five boroughs, playing host to a whopping 660 educators who’ve been accused of everything from sexual abuse and stealing to incompetence.”

As part of the deal, the city will also hire more arbitrators — raising the total to 39 from 23 — and set a strict time limit on the length of investigations and hearings.

Most probes would be given a 60-day time limit, while most hearings would be confined to a similar two-month period.

Those accused of relatively minor offenses would go through an expedited hearing process of no more than three days, the agreement says.

The city’s eight rubber rooms cost the city $30 million in salaries alone last year, according to the Department of Education.

Bloomberg credited Howard Wolfson, his new communications director, as a key player in the negotiations between City Hall and the UFT.