SAN FRANCISCO — Yahoo’s lawyers were ready to fight a government lawsuit blocking the search engine’s ad-sharing deal with Google. One small problem: Google wasn’t.

Google GC David Drummond announced in a blog post Wednesday morning that his company wasn’t willing to go to the mat with antitrust regulators to save a deal that was viewed as a lifeboat for rival Yahoo.

“Pressing ahead risked not only a protracted legal battle but also damage to relationships with valued partners,” Drummond wrote.

The Department of Justice said in a press release Wednesday that it had been ready to file suit to block the deal that “if implemented, between these two companies accounting for 90 percent or more of each relevant market would likely harm competition in the markets for Internet search advertising and Internet search syndication.”

The partnership would’ve outsourced some of Yahoo’s search advertising to Google and brought in an estimated $800 million a year.

Michael Weiner, a Skadden, Arps, Slate, Meagher & Flom antitrust partner who represented Yahoo, said that he believes the revised version of the ad deal could have prevailed in court. With intense scrutiny from regulators, the terms were redone over the weekend to cut the length of the partnership from 10 years and cap the revenue that Yahoo would get from the deal.

“The concern was that Yahoo was exiting the [search ad] business — this clearly shows that they weren’t,” Weiner said.

Antitrust regulators don’t have a particularly strong record in Silicon Valley. They famously lost the case trying to block Oracle’s hostile bid to take over PeopleSoft in 2004.

Gary Reback, an antitrust veteran with Carr & Ferrell in Palo Alto, summed up the usual stance: “In recent years, people have given the government the middle finger and said, ‘I’ll see you in court.’”

In this case, though, Reback said, Google had nothing to gain by fighting.

“Google has zero upside and enormous downside in fighting,” he said. “Yahoo has an upside in fighting, but what are they going to do, fight it themselves?”

Yahoo tried to bring back the magic of Oracle’s win over the Department of Justice by bringing in Latham & Watkins San Francisco partner Daniel Wall, who led the victorious Oracle trial team. R. Hewitt Pate, a Hunton & Williams partner, also represented Yahoo in dealing with the government.

On the Google side, Wilson Sonsini Goodrich & Rosati’s Susan Creighton and Cleary Gottlieb Steen & Hamilton’s David Gelfand and Leah Brannon did the heavy lifting in dealing with the Department of Justice.

The lawyers who hammered out the initial agreement — and who were very confident that it would stand up to government scrutiny — were Sheppard, Mullin, Richter & Hampton’s Brian Pass for Yahoo and Wilson Sonsini’s Suzanne Bell for Google.

“I share Yahoo’s disappointment,” Pass said on Wednesday.

“I think it’s disappointing for both parties,” Bell said.

Skadden’s Weiner said there was another player at the table: Microsoft, whose takeover bid for Yahoo was nixed when the ad pact was signed this summer.

“Microsoft was quite vocal in its opposition from the outset, and it’s reasonable to expect that they were busy trying to oppose, and encourage opposition,” Weiner said.

Carr & Ferrell’s Reback said that the partnership also came at a bad time because of pressure on the government to look more closely at antitrust activity. Two big deals, Maytag-Whirlpool in the washer market and Sirius-XM in the satellite radio market, got government approval in the past two years.

Reback said that the assistant attorney general for antitrust seemed more cautious after the criticism on those big deals. “Tom Barnett finally read the Sherman Act,” he said.

With Democrats now in power in Washington, Reback said that there will likely be more antitrust enforcement on the way.

“Google is just smarter than to open a legal proceeding, especially when the Democrats are coming to power,” Reback said.