New York City’s internal wireless network that crashed earlier this month has over the last decade morphed into a nearly $900 million taxpayer money pit that’s about to sink much deeper.

Since Northrop Grumman was tapped in 2006 to build and run the New York City Wireless Network – also known as NYCWiN — the global defense contractor has racked up $891.1 million in payments off an initial five-year deal and two renewals, an examination of more than 400 pages of city records found.

This includes at least $55.1 million in unanticipated cost overruns the city agreed to pay Northrop Grumman for construction work and services not included in the original agreements. The contractor could also pocket up to $11.8 million more through additional change orders for added work by the time its current three-year deal expires June 11.

If that’s not enough, the city’s Department of Information Technology and Telecommunications told The Post it plans to extend the contract another year through mid-June 2020 — a move that will likely cost taxpayers at least $40 million more based on previous spending.

“It appears to me that we’re getting taken to the cleaners,” said Queens Councilman Robert Holden. “With all this extra money we’ve kicked in, you’d think [the network] would be better protected and we’d be get a bigger bang for our buck, but we haven’t.”

Despite pouring a fortune into a cellular-antenna infrastructure created to help agencies control traffic lights, license-plate readers used by cops and other key functions, the city still found itself vulnerable earlier this month. Already-underperforming NYCWiN suffered an embarrassing — and entirely preventable — crash that lasted 10 days.

The cyber-screw-up has left Comptroller Scott Stringer and local lawmakers calling for answers from Northrop Grumman and the city’s embattled tech czar, Samir Saini. They want to know why NYCWiN’s software wasn’t updated before a Y2K-like bug caused the network to go dark April 6 and remain on the fritz through last Tuesday.

Only a year earlier, the federal government issued a warning that a time-counter “rollover event” could affect GPS-enabled devices like NYCWiN –- yet neither Northrop Grumman nor the city tech department took the necessary precautions.

Northrop Grumman did not return messages.

Holden, who sits on the Council’s technology committee, said he spoke to Saini and other DoITT officials Friday and “learned” DoITT feels “trapped” into extending the contract with Northrop Grumman because “no one” in city government “knows how to deal with the NYCWiN software.”

“That’s why we’re overspending,” he said. “It’s like we’re at the contractor’s mercy.”

However, the city could have potentially avoided the software crash and renewing its relationship with Northrop Grumman had it followed the lead of former DoITT Commissioner Anne Roest.

In May 2017, she testified during a City Council hearing that the agency needed to break away from the Northrop Grumman deal as soon as possible.

Roest said NYCWiN was getting “more expensive” to maintain and needs “hundreds of millions of dollars in upgrades.”

She also revealed DoITT planned to transition city agencies over to a faster, cheaper wireless service to be provided by commercial carriers like Verizon. She estimated the savings would be $30 million annually.

Roest stepped down seven months later, and Mayor Bill de Blasio appointed Saini as her replacement.

City Hall sources said DoITT’s urgency to switch over to commercial wireless carriers waned after Roest left.

City Council members – including Speaker Corey Johnson – said they expect the Council to review the NYCWiN deal, including potentially holding oversight hearings where city tech officials would be asked to testify.

However, Bronx Councilman Ritchie Torres, who chairs the oversight and investigations committee, said he believes the contract warrants an even more extensive probe by the Department of Investigation because “lives were put at risk” by the network crash.

“I find it troubling that DoITT is intent on extending the contract of a poorly performing vendor whose cost overruns have proven to be a drain on the public treasury,” Torres said. “Instead of holding contractors accountable, the city continues rewarding bad behavior–all at taxpayer expense.”

DoITT spokeswoman Stephanie Raphael said Northrop Grumman “is the only vendor that can operate NYCWiN” but claimed the agency “is in the process” of switching over “to a system that will utilize cellular carriers.”

Raphael said DoITT would be operating a “pilot program” with several agencies using commercial cellular carriers, but she declined to say which agencies and carriers would be involved and what it would cost taxpayers.

She also refused to comment on calls by some critics for Saini to resign.

Two months after arriving in the Big Apple, a government computer network that Saini previously oversaw for the city of Atlanta was crippled by a cyber attack.