“Law & Order” is going out with a bang — taking a snarky swipe at the city’s infamous “rubber rooms” for teachers in its series swan song.

NBC’s war-horse drama, famous for using New York City as its backdrop, ends its 20-season run May 24 with an episode that pulls no punches, titled “Rubber Room.”

There’s a tangible sense of disdain shown toward the “rubber-room” system, in which city teachers collect full salaries for sitting on their butts while awaiting disciplinary hearings — or “doing crossword puzzles, sorting recipes,” according to a school administrator who’s interviewed by “L&O” Detectives Lupo (Jeremy Sisto) and Bernard (Anthony Anderson).

That system, which cost taxpayers $30 million a year, has now been abolished, thanks in part to The Post’s crusading coverage.

In the “Rubber Room” episode, Lupo and Bernard are assigned to investigate a rogue Web site run by an anonymous blogger named “Moot,” who’s apparently armed to the teeth and threatening to blow a city school to smithereens.

Most of Moot’s rants focus on his former teachers, and after gaining access to a site in which city teachers gossip about their jobs, Lupo and Bernard are steered toward a “Temporary Assignment Center” in Queens.

“Welcome to the rubber room,” says a droll administrator who shows the detectives two separate rooms in which groups of teachers sit — one plucking his eyebrows, another lazily squeezing a hand exerciser — “seven hours a day, five days a week” while waiting for their disciplinary cases to be heard.

Lupo and Bernard then interview several rubber-room teachers who seem to fit the profile of those targeted on Moot’s site — including a science teacher, now exiled to Suffolk County, who received a four-month suspension for allegedly “branding kids with crosses” — when in fact he merely ran a coil over their arms during a class lesson on electric energy.

Another rubber-room teacher tearfully tells the detectives that his 30-year career was destroyed after he was charged with hitting a student — when all he did was swipe at the kid’s gelled hair to get him to pay attention.

“I barely touched him,” he sobs.

A third teacher says he was accused of child molestation after trying to stop a student from urinating in a classroom trash can.

In typical “Law & Order” fashion, Lupo and Bernard crack the case — but you’ll have to wait for the episode to see the bounce they get from their rubber-room rendezvous.

michael.starr@nypost.com

