A judge Thursday dismissed a lawsuit that threatened the iconic Maid of the Mist’s continued operation of boat tours on the American side of Niagara Falls.

State Supreme Court Justice Catherine Nugent-Panepinto threw out a suit from a California company, deferring to the decisions made by state agencies involved in the process that allowed for a new boat dock and storage facility be built for the Maid on the American side.

Nugent-Panepinto’s ruling found that Hornblower Yachts did not have the legal standing to challenge a deal announced last year between the state and the Maid that allows the company to build a $32 million facility on the former Schoellkopf Power Station site in the Niagara Gorge.

The judge, in her ruling, deferred to the state’s conclusion that public bidding was not required for the construction of the docks and storage facility.

“This Court is compelled to exercise a high degree of judicial deference to the involved New York state agencies, in particular the Office of Parks and the Office of the State Comptroller,” the judge wrote citing case law, “especially when as in the case here, they are acting in the area of their particular expertise.”

The state’s agreement with the Maid of the Mist, announced last December and involving a visit by Gov. Andrew M. Cuomo, was seen as critical for the company’s continued existence.

Hornblower recently won the tour rights beginning next year on the Canadian side of the border. That had been where the Maid’s boats were stored in the winter, which means the Maid lost access to a place to store its boats.

In addition to this lawsuit, the Maid of the Mist also faced other legal challenges from the Niagara Preservation Coalition, which sought to stop the construction of the new facility because it said the proper environmental reviews were not conducted prior to the start of construction of the project.

Several rulings this year on the state level came down in favor of the Maid, while the preservation coalition has recently taken its case to federal court.

Brian D. Gwitt, an attorney for the Maid of the Mist, said the judge’s ruling is just the latest to indicate that proper procedures were followed.

“This is further confirmation that we did the right thing,” Gwitt said.

A representative of Hornblower could not be reached to comment late Thursday.

Hornblower filed suit earlier this year, arguing that the new deal should be nullified. Attorneys for various state agencies argued that the deal was an amendment to an existing agreement signed in 2002 and was not required to be put out for bid.

The agreement between the state and the Maid from 2002 was signed with no public notice and no public bidding.

As part of last year’s agreement, the Maid also will triple its annual rent payments to the state, now expected to reach $105 million over the three decades left on the contract. The facility in the gorge is expected to cost $32 million.