Updated from Aug. 17

SAN FRANCISCO -- Shares of Whole Foods ( WFMI) and Wild Oats ( OATS) were jumping Friday after a federal judge denied the government's request to block the grocers' combination.

Shares of Whole Foods were climbing $2.45, or 6%, to $43.62. Wild Oats soared $2.73, or 18%, to $17.94, approaching the buyout price of $18.50 a share.

The judge rejected the Federal Trade Commission's arguments that the $565 million deal would hurt competition in the organic foods sector and result in price hikes and diminished services for customers.

The ruling marks a significant win for the grocers, but the deal is not yet sealed up. The FTC still has the option to appeal Thursday's ruling, and may seek an emergency stay from either the district court or the U.S. Court of Appeals for the District of Columbia Circuit.

In a statement, the FTC said it is reviewing its options on how to proceed.

Whole Foods Market and Wild Oats Markets have agreed with the FTC to not close the merger prior to noon on Monday. After that, the companies may proceed with the transaction, absent a stay for a pending appeal.

"The District Court's ruling affirms our belief that a merger between Whole Foods and Wild Oats is a winning scenario for all stakeholders," said Whole Foods Chairman and CEO John Mackey in a statement. "We believe the synergies gained from this combination will create long term value for customers, vendors, and shareholders as well as exciting opportunities for team members."

Wild Oats echoed those sentiments. "We're very pleased with the court's ruling and we knew once presented with the facts, the judge would rule in favor of the merger," said spokeswoman Sonja Tuitele.

Whole Foods and Wild Oats had vigorously fought against the FTC's claims that their combination would create a natural-foods monopoly. Both companies argued that enough traditional supermarkets, like Safeway ( SWY) and Kroger ( KR - Get Report), have moved into organic and natural foods.

The deal received heightened attention after the FTC's suit revealed that Whole Foods CEO John Mackey had made comments under a pseudonym for seven years on Yahoo! ( YHOO) message boards promoting his company while disparaging Wild Oats.

The companies were back in the news earlier this week after the government accidentally released certain confidential Whole Foods trade secrets.

George Whalin, president of Retail Management Consultants in Southern California, says that if the deal goes through, it will allow Whole Foods to grow its store base.

"It means that they're going to be able to solidify their position in the industry," he says. "It's the best thing for them."

Whole Foods has about 197 stores in the U.S., Canada and the U.K. Last year, it recorded $5.6 billion in sales. Wild Oats operates about 109 stores in 23 states and British Columbia, Canada, with more than $1.2 billion in annual sales. Its stores are slightly smaller than Whole Foods but offer similar products.

As for the FTC's claims, Whalin says they don't hold water. "It was a silly lawsuit in the first place," Whalin says. "Kroger is in organics, so is Safeway, so is every other supermarket chain, and they're getting stronger in it."

Tuitele says it will take about two years to integrate Wild Oats into Whole Foods. The companies plan to shutter overlapping stores, although they have not yet determined which ones. Tuitele says Wild Oats store employees have been told that they will keep their jobs under the merged company.

Whole Foods has already said that it plans to transfer all 35 Henry's and Sun Harvest store locations under Wild Oats, as well as a Riverside, Calif. distribution center, to a wholly owned subsidiary of Smart & Final, a Los Angeles-based food retailer privately held and controlled by private-equity firm Apollo Management.

Elsewhere, the FTC's defeat sent shares of radio merger partners Sirius Satellite Radio ( SIRI - Get Report) and XM Satellite Radio ( XMSR) climbing Friday.

That pending deal has also been plagued by antitrust concerns since the two companies are the nation's only satellite-radio operators. Investors were betting, though, that the Whole Foods ruling could bode well for Sirius and XM's efforts to push the deal through.

Shares of Sirius were up 9 cents, or 3.3%, to $2.80. XM shares were up 23 cents, or 2.2%, to $10.78.