NEW YORK — Another day, another derailment. And another round of finger-pointing on who is to blame for problems with New York City’s troubled transit system.

On Friday, a “B” train derailed near the end of the line in Brooklyn, causing no major injuries but briefly gumming up a subway system that has seen its share of horror shows lately.

“This derailment is indicative of a creaking mass transit system that needs urgent upgrades to fit the needs of a 21st century city,” Brooklyn Borough President Eric Adams tweeted.

Last month, a Harlem subway derailment tossed around riders and forced hundreds to evacuate through darkened tunnels. In another case, riders were trapped for nearly an hour on a sweltering train with no air conditioning. On Wednesday, a Long Island Rail Road train derailed.

One rider tweeted Friday: “Glad no one was hurt on the derailment but the ripple effect is … can I get a note for work? Again”

The subway problems aren’t even technically part of Gov. Andrew Cuomo’s aptly named “summer of hell,” which refers instead to summer-long track work and corresponding schedule cutbacks for suburban commuter trains at Penn Station. So far, that hell hasn’t materialized, and both Cuomo and Amtrak officials have said the work to replace aging equipment and track at the nation’s busiest train station is going well.

But within the five boroughs, riders haven’t been so lucky. The number of subway delays has tripled in the past five years, to 70,000 per month, and rush hour cancellations and delays on the Long Island Rail Road were at the highest level in 10 years, according to a report last month. About 5.7 million people ride the subway on an average weekday.

“The summer of hell is turning into the summer of fear,” said Nick Sifuentes, Deputy Director of the Riders Alliance.

And the contentious squabbling between Cuomo and Mayor Bill de Blasio on management of the crisis boiled over again this week, mostly on whether the city or state governments should be paying more.

The current five-year MTA capital plan, which covers upkeep for the subways, the Long Island Rail Road and Metro-North, plus other pieces of the transit system, is about $29 billion. The city has pledged $2.5 billion and the state $8.3 billion, plus Cuomo recently pledged an additional $1 billion.

“The state has put in more money than ever before in the history of the state, and it’s the city’s legal obligation to be funding it, even though we stepped in on a moral level,” Cuomo told reporters Thursday.

His statements prompted a fast rebuke from the mayor’s office.

“New Yorkers need serious leadership at a time like this,” city spokesman Austin Finan said. “The city’s unprecedented $2.5 billion commitment in the state-run MTA capital plan is far in excess of any legal obligation. Let’s stop the diversions and obfuscation and start spending the resources the MTA has on the repairs and maintenance that will keep New Yorkers moving.”

Their debate prompted a history lesson by Metropolitan Transportation Authority head Joe Lhota on how the messy ownership structure came to be. He said a 1981 law was meant to help the city during a major financial crisis, when it could not pay capital costs and the subways were in much worse shape than they are now. The state picked up the tab, but it was never meant to be permanent, he said.

He said the city now has a surplus of about $4 billion, and he’s going to submit an emergency plan to deal with the crisis.

And he expects the city to chip in.