The giant Staten Island Ferris-wheel project is spinning out of control.

The design team building the 630-foot-high New York Wheel on the borough’s north shore got into a bitter pay dispute with the developer — and walked off the job in late May.

The developer then made desperate pleas to a federal judge to get the work started again, saying the revitalization of Staten Island’s waterfront was at stake. And the developer’s lawyer, former Deputy Mayor Randy Mastro, tried to keep the dispute hush-hush.

“When the world knows that [the] project has been stopped, whether you call it suspension or termination or withdrawal, that is the death knell for the project,” Mastro argued before federal Judge Edgardo Ramos last month.

“When the New York Post and the Daily News and the Times write about this, the impression is the project has gone south,” he added.

Court filings revealed other problems threatening to bring the $600 million wheel — which would be the largest in the Western Hemisphere — to a grinding halt. Among them:

Bad welds on the giant legs that will hold up the wheel have been flagged by city inspectors, delaying ­required approvals.

The pad upon which the wheel will sit is “defective.”

A “wrong” attachment between wheel and pad.

Vast cost overruns and “extortionate” billing. The original $300 million price tag has doubled.

The wheel was supposed to open this year, but its completion has been pushed back to the spring of 2018.

The wheel, if it’s ever completed, is expected to attract 3.5 million visitors a year, taking them on a 38-minute ride in one of 36 pods with vistas of the Statue of Liberty and the Manhattan skyline.

It is being built in the island’s St. George section on land leased by the city for $1 million a year and is part of a massive waterfront redevelopment project that includes a factory-outlet shopping center and hotel.

The wheel is being designed and built by Mammoet-Starneth, a ­European company whose staffers include those who worked on the London Eye wheel.

The company walked off the job site at the St. George waterfront on May 26, leading the developer, New York Wheel, to charge that it had breached its $165 million agreement to build the spinning attraction.

It accuses the design company in court papers of “two years of self-inflicted delays and extortionate ­attempts to extract additional payments totaling more than 50 percent of the agreed contract price.”

A New York Wheel consultant said in court papers that the city Department of Buildings has yet to issue permits to go forward, a delay he blamed on the choice of manufacturers for the giant legs. The fabricators chosen by Mammoet-Starneth were not on the DOB’s approved list, and inspectors found “nonconformities that required remediation.”

Mammoet-Starneth blames New York Wheel for building a faulty pad to hold the wheel, and in court arguments maintained that there was ­“insufficient soil support and parts that don’t work.”

Mammoet-Starneth would not comment to The Post.

A DOB spokesman said its special inspector “identified a minor problem with a few welds” that are in the process of being fixed.

“The developer has honored all of its contractual obligations and is committed to getting this unique project completed to the benefit of all stakeholders, public and private,” said a New York Wheel spokeswoman.

The two sides agreed on June 12 to a 30-day mediation period to end in mid-July. But the construction site was nearly dormant during a Post visit last week, when only a single person in a hard hat was seen.