The Second City took a first-class pummeling this week after Mayor Rahm Emanuel dared to boast in a New York Times op-ed about Chicago’s L system at the expense of the Big Apple’s and Washington D.C.’s transit systems.

“DUMB TRACK MIND” screamed the July 4 headline across the front page of the tabloid Daily News.

“Congratulations to Chicago for having a transit system that’s so popular with its passengers. Now try getting them home without anyone getting shot,” the story inside went on to say.

In the July 3 op-ed, Emanuel said that while New York is dealing with an “epidemic of train delays” and the Washington Metropolitan Area Transit Authority dispensed free coffee coupons this week to delayed riders, “in Chicago, a recent survey found that 85 percent of passengers are satisfied with service on our transit system, the second most used.”

“Unlike New York, which has spent billions to reach Hudson Yards, or Washington, which has concentrated on trying to reach Dulles Airport [both laudable projects], Chicago has improved the existing system,” the mayor wrote.

Emanuel went on to say: “Modernizing our existing mass transit is one reason Chicago’s economy has expanded faster than the economies of New York and Washington, and faster than the national average for the last five years.”

All of that bragging apparently infuriated New Yorkers.

“The mayor of Chicago would seem to have enough of his own problems to focus on without trying to save face by capitalizing on someone else’s crisis,” said Joe Lhota, chairman of New York’s Metropolitan Transportation Authority, in a statement.

Both the Daily News and New York Post stories cited crime stats, showing Chicago has had more than double the number of murders so for in 2017 than its bigger neighbor to the east.

Emanuel spokesman Adam Collins said the mayor’s piece in the Times was motivated by a genuine desire to be helpful.

“There is a big national discussion right now about infrastructure investments and the federal government’s role in driving those investments,” Collins said Tuesday.

“So the mayor wrote a thoughtful op-ed about what he sees for the federal government to help pave the way for infrastructure around the country. And he also offered some examples and some lessons we’ve done here,” Collins added. “In major urban centers, transit and infrastructure are vital to a city’s economy and we have had an approach in Chicago of investing in the foundation of our transit system.”