A Hudson County judge dealt a major blow to New York Waterway in its fight to bypass Hoboken’s planning and zoning boards to build its controversial ferry maintenance and refueling facility.

Hudson County Superior Court Judge Jeffrey Jablonski on Monday dismissed the ferry company’s lawsuit requesting that he order the city to not interfere with marine operations at the Union Dry Dock site, which NY Waterway purchased for $11.5 million in 2017.

“Hoboken is appreciative of the court’s sound decision on this matter of critical importance to our city," Hoboken Mayor Ravi Bhalla said in a statement. "It affirms that no one is above the law, and the rules apply equally to everyone including New York Waterway.”

The dismissal of NY Waterway’s complaint is the latest development in what has been a public, and at times, nasty fight over the site, which was long home to the Union Dry Dock and Repair Co.

Bhalla said the city remains committed to acquiring the property of Frank Sinatra Drive as public, open space, saying the ruling "puts us one step closer to making this a reality.” On June 3, Bhalla said the city was renewing its effort to acquire the land via eminent domain.

NY Waterway attorney Anthony Bocchi argued in court Monday that the company has state and federal permits to replace piles at the industrial site, as well as bring in two barges, build ramps and gangways.

The attorney argued that local permits are not needed for the offshore work, adding that when minor work was being done at the site, Hoboken police stopped those operations, saying it was the object of a lawsuit by the city.

Bocchi called the officers’ actions gestapo-like, drawing an emphatic response from Lt. John Petrosino, president of the Hoboken Police Superior Officers Association.

“It’s abhorrent that New York Waterway’s high-paid attorney would equate the Hoboken Police Department as the ‘Gestapo,’" Petrosino said in a statement. “We demand an immediate and unequivocal apology from New York Waterway.”

Bocchi also argued that applying for permits from the “hostile city” would be futile, and noted Bhalla once said the site would become a ferry facility “over my dead body.” He added that an electrical permit has not been approved by the city in 17 months and that Bhalla himself posted a stop work order at the location on one occasion.

Yet, NY Waterway conceded that it will need local permits for onshore portions of the project but said phase one only requires parking and structures similar to what is already there.

Hoboken attorney Christopher Miller noted in court that the city has a right to review NY Waterway’s proposed use for the location and that planning and zoning board review of the project “would not be a process for stopping the industrial project.”

Miller said an order by the judge allowing the company to bypass local approvals would be premature and that only after permits are sought could the court say if the city had acted arbitrarily, capriciously or unfairly.

In the end, Jablonski ruled that it was premature to say filing for permits would be futile for NY Waterway. He also found that the project’s offshore and onshore portions are “inextricably intertwined” and that NY Waterway’s federal and state permits both require the company to acquire any local permits needed.

“The court has spoken,” NY Waterway CEO Arthur Imperatore Sr. said after Monday morning’s hearing. “We will comply.”