A San Francisco judge has tossed out most of a legal challenge to the controversial plan to convert the shuttered Hunters Point Naval Shipyard and nearby Candlestick Point into a new neighborhood with more than 10,500 homes, clearing the way for work to begin on the project.

Superior Court Judge Ernest Goldsmith, in a 37-page ruling made public Monday, found that the environmental review for the mega-project was adequate in all regards except one: the early transfer of some parcels of the shipyard.

Developers working with the city had hoped to take over two parcels before the Navy had finished cleaning them up to finish the remediation themselves and start construction more efficiently. Now their timetable will be slightly delayed.

Concerns about naturally occurring asbestos becoming airborne or the release of toxic material at the Superfund site in the case of an earthquake were adequately dealt with through mitigation measures outlined in the environmental impact report approved by the city, Goldsmith found.

"The court has confirmed that this project properly analyzed the environmental impacts," Mayor Ed Lee said in a statement. "We can now move forward, and I look forward to many milestones as we bring housing, jobs and commerce to residents and businesses in Bayview-Hunters Point."

As the Navy completes cleanup of individual parcels among the project's 700 acres along San Francisco's southeastern shores, it will be turned over to the city for development.

Originally, the Sierra Club, the Golden Gate Audubon Society and Power, a local activist organization, all brought legal challenges against the city and the private developers it's teaming with on the project. The Sierra Club and the Golden Gate Audubon Society settled their suits in January.

Power continued its legal challenge. An attorney for the group could not be reached late Monday.

Kofi Bonner, president of Lennar Urban, a private developer teaming with the city on the project, called the ruling as "a great victory for the city and the residents of Bayview-Hunters Point."