The city can host an oceanfront Fourth of July fireworks show this year without a rigorous environmental review, a judge ruled Friday in a decision that also temporarily spared tens of thousands of other local festivities.

Superior Court Judge Linda Quinn put on hold for 90 days her sweeping ruling that briefly jeopardized fireworks displays and many other events in the nation's eighth-largest city, including charity runs, block parties, and birthday parties and weddings at city parks.

The judge ordered the city to explain Aug. 31 what it has done to comply with her ruling that makes fireworks shows and other events subject to review under the California Environmental Quality Act. Her ruling came in a lawsuit over a Fourth of July show in the city's La Jolla Cove.

Mayor Jerry Sanders welcomed the decision in remarks that suggested the dispute over the 27-year-old La Jolla show was far from over.

"This is great news for the thousands of San Diegans who plan to mark this Independence Day with a beautiful La Jolla fireworks show. The idea that a once-a-year fireworks display poses a threat to the environment defies both basic common sense and scientific evidence," he said.

City Attorney Jan Goldsmith said he would work with the City Council to change San Diego's municipal code in a way that exempts fireworks and other festivities from environmental reviews. He also plans to approach state legislators and agencies about creating statewide exemptions.

Goldsmith said the city has not decided whether to ask California's 4th District Court of Appeal to overturn Quinn's far-reaching May 27 decision. Neither has the show's sponsor, the La Jolla Community Fireworks Foundation, according to the group's attorney, Robert Howard.

The Coastal Environmental Rights Foundation sued San Diego last year to force a review of the La Jolla fireworks show under CEQA, as California's landmark 1970 environmental law is known. The lawsuit contends that the hundreds of explosives dump chemicals in the water and threaten seals, birds and other wildlife.

The cove, in one of San Diego's wealthiest and most scenic areas, is also the subject of a long-running legal dispute about whether to allow swimmers to mix with seals.

Last week, the City Council revised the municipal code, in part, to exempt fireworks shows from special-event permits. The move backfired when Quinn took exception to new wording on park permits and made them subject to environmental review. The city issues 20,000 to 50,000 park permits a year for events including birthday parties and weddings.

The ruling also applied to about 400 larger venues known as special events, including Sunday's Rock `n' Roll Marathon and a Mardi Gras party in downtown's bustling Gaslamp Quarter.

The Encinitas-based environmental group that sued the city said it would consider its next steps over the weekend. Its attorney, Marco Gonzalez, told the judge Thursday that he had no objections to putting the ruling on hold for all events except the La Jolla fireworks show.

"While we're of course not happy with the court's ruling, we understand the immense pressure the city and fireworks organizers have created by delaying these proceedings so long and by dragging in all of the other events that could be possibly impacted," Gonzalez said.

The group said it was "somewhat troubling" that the judge did not explain an apparent change of heart from the beginning of a hearing Thursday, when she said she was inclined to let her order take effect immediately. Her brief order Friday said only that she put the ruling on hold after having considered the show organizer's request, written statements of support for the delay and the arguments at Thursday's hearing.

Deputy City Attorney Glenn Spitzer told the judge Thursday that San Diego's economy would lose tens of millions of dollars if environmental reviews were immediately required.

The city gave the judge written statements from scores of charities. The Leukemia & Lymphoma Society's local chapter said its fundraising activities were threatened. The organizer of San Diego's St. Patrick's Day Run said the cost of an environmental review would mean less money for a hospital charity that helps families lacking health insurance.