Matt Rourke/Associated Press

Anheuser-Busch InBev said on Friday that it had reached an agreement in principle to win government approval for its $20.1 billion deal to buy control of Grupo Modelo, the maker of Corona.

The Obama administration sued on Jan. 31 to block the takeover, arguing that the deal would give Anheuser-Busch InBev too much control over the American beer market, potentially reducing choice while raising prices.

Anheuser-Busch did not immediately disclose details of the agreement but said “the proposed resolution is substantially in line” with revised terms announced in February. It offered then to sell its 50 percent stake in Crown Imports, the company that imports Corona into the United States, to Constellation Brands for $2.9 billion. Constellation, one of the world’s largest wine companies, already owns half of Crown alongside Modelo.

Anheuser also agreed to sell the rights to Corona and other Modelo brands to Constellation, as well as a brewery close to the United States-Mexico border currently owned by Grupo Modelo.

The government’s opposition threatened to stymie a merger that Anheuser-Busch InBev has deemed important for its growth. Buying full control of Modelo, of which it already owns 50 percent, would help solidify its footprint in fast-growing markets in Mexico and elsewhere in Latin America.

Such a deal would be a crowning achievement of Anheuser-Busch InBev’s chief executive, Carlos Brito, who built the company into a global colossus through a relentless series of takeovers.

The government had argued in its lawsuit that Anheuser-Busch InBev, which already makes Budweiser and Stella Artois, would only solidify its hold over the American market. Together, the company and Modelo would control about 46 percent of beer sales in the United States.

The government’s lawsuit detailed how, in California, a price war among the biggest brewers had led Anheuser to complain in internal documents that Modelo’s strategy was “eating [Budweiser’s] lunch.”

The lawsuit reflected a tougher stance by the Obama administration toward industry-changing mergers. The Justice Department sued to block AT&T’s proposed $39 billion takeover of T-Mobile USA, forcing the telecommunications companies to abandon their merger.

Analysts have largely expected Anheuser-Busch InBev and the Justice Department to reach an accord on reasonable terms. The company has long regarded holding onto the United States rights to Corona and other brands less important than keeping control of Modelo’s operations elsewhere.

Anheuser and the Justice Department have asked the federal district judge overseeing the antitrust lawsuit to extend a stay of proceedings until April 23, to let them complete details of the agreement.

“As we have said all along, any settlement would have to fully protect U.S. consumers by preserving the competition that Grupo Modelo currently provides, while giving a divestiture buyer the freedom and capability to compete vigorously going forward,” Gina Talamona, a spokeswoman for the Justice Department, said in a statement.

The transaction is also subject to approval by Mexican regulators.