The MTA is refusing to let the Transport Workers Union run ads in the subways that make its case for a pay hike. The agency may be within its legal rights, but it still looks petty.

“Every 36 hours, a transit worker is assaulted on the job,” the ad reads. “We deserve a wage increase for our sacrifices.” Photos show an arm bleeding from slash wounds, a woman in a neck brace in a hospital bed and two workers who’d been beaten up.

The union hoped to spend $190,000 to run the ad in 120 stations for eight weeks.

But MTA spokesman Kevin Ortiz insists the message is “not in a permitted category — it isn’t a commercial ad, nor is it a governmental ad, and it isn’t a public-service announcement directly relating to one of the permitted topics.” Instead, it’s “prohibited because it’s political in nature.”

Well, it’s certainly advocacy. And the MTA has already twisted itself in knots to avoid running ads that, most notably, charge that Islam is inherently extreme.

On the p.r. front, though, you have to score this as a win for TWU chief John Samuelson. He charges: “The MTA clearly doesn’t want riders to see the faces of the workers who are assaulted in the line of duty every day.”

No one will confuse us for fans of the TWU, but it’s too bad MTA management can’t look more fondly on free speech.