(Photo via iStock)

Correction, 8/7/14, 10:51 a.m.: An earlier version of this story misidentified the law firm representing Alliance Boots in its stake sale to Walgreens. Darrois Villey Maillot Brochier advised Alliance Boots while Simpson Thacher & Bartlett took the lead for Kohlberg Kravis Roberts, an Alliance Boots controlling investor. The story has been updated accordingly. We regret the error.

In a reversal of the popular but controversial trend of U.S. companies moving overseas to save on taxes, Walgreens said on Wednesday it would buy the stake in Alliance Boots it doesn’t already own for $15.3 billion in cash and stock but keep its current Illinois tax address once it takes full ownership of the chain.

Walgreens is purchasing the remaining 55 percent stake in Europe’s largest pharmacy retailer from Alliance Boots GmbH in the second step of a two-step deal, having already purchased a 45 percent stake in the Swiss health and beauty retail chain in 2012 for $6.7 billion.

As part of this latest deal, Walgreens would pay Boots $5.3 billion in cash and 144.3 million shares worth $10 billion. The transaction is subject to shareholder and various regulatory approvals and is expected to close in the first quarter of 2015.

Wachtell, Lipton, Rosen & Katz and Allen & Overy acted as legal counsel to Walgreens. Paris-based Darrois Villey Maillot Brochier advised Alliance Boots, while Simpson Thacher & Bartlett took the lead for Kohlberg Kravis Roberts, an Alliance Boots controlling investor. Gibson, Dunn & Crutcher represented Lazard, the financial adviser to Walgreens.

The acquisition would create the first global pharmacy-led health enterprise, with about 11,000 stores in 10 countries. It would also become the world’s biggest pharmaceutical wholesale and distribution network, with more than 370 distribution centers.

The two companies would also merge their senior management. Greg Wasson, the president and CEO of Walgreens, would continue his role, and Alliance Boots executive chairman Stefano Pessina would become executive vice chairman, responsible for strategy and mergers and acquisitions.

“We are excited to move forward with the next important step in becoming a new kind of global health care leader,” Wasson said in a statement. “Expanding globally with Alliance Boots will make quality health care more affordable and accessible to communities here in America and around the world.”

Walgreens’ decision not to redomicile outside of the U.S. contrasts a wave of so-called inversion deals used by many domestic companies to move their tax address abroad through acquiring or setting up operations in a foreign country. Inversions allow these companies to avoid the 35 percent U.S. corporate tax—the highest corporate tax in the world—in favor of lower tax rates in countries like Ireland and the U.K.

But the strategy has come under fire, with the Obama administration on Tuesday saying it would seek actions to curtail overseas tax flight, according to The New York Times. President Barack Obama has demanded more “economic patriotism” from companies avoiding taxes through cross-border mergers. “I don’t care if it’s legal— it’s wrong,” he said in a speech at the Los Angeles Trade-Technical College on July 24.

According to Bloomberg, Walgreens could save at least $4 billion in taxes over five years by reincorporating overseas. However, the company decided that an inversion deal might not serve its best interest.

In his statement, Wasson said Walgreens “could not arrive at a structure that provided the company and our board with the requisite level of confidence that a transaction of this significance would need to withstand extensive IRS review and scrutiny.” Instead of tax evasion, Walgreens said it would focus on cost control, expecting to achieve $1 billion in cost savings by fiscal 2017.

The company also noted that it is “mindful of the ongoing public reaction to a potential inversion and Walgreens’ unique role as an iconic American consumer retail company with a major portion of its revenues derived from government-funded reimbursement programs.”

Other U.S. companies have taken a different view. Chicago-based Pharmaceutical giant AbbVie, for instance, agreed last month to purchase Dublin-based Shire for $54.8 billion in cash and stock in what is the largest inversion to date.

Advising Walgreens on its stake purchase of Alliance Boots is Wachtell, with a team led by corporate partners Andrew Brownstein and Benjamin Roth and assistance from tax partner T. Eiko Stange. Associates working on the deal were Matthew Danzig, Tijana Dvornic, Jacob Kling and Edward Lee.

Allen & Overy’s team for Walgreens consisted of corporate partner Justin Steer, antitrust partner Paul Glazener and associate Emily Barker.

Simpson Thacher acted as legal counsel for Alliance Boots investor KKR. The team was led by M&A partner Mark Pflug. (Simpson Thacher did not provide names for the rest of the team by press time.)

Gibson Dunn represented Walgreens financial adviser Lazard. The team included corporate partners Eduardo Gallardo and Dennis Friedman, as well as associate Saee Muzumdar.

Wachtell, Allen & Overy and Simpson Thacher all jointly worked on Walgreens’ purchase of 45 percent of stake in Alliance Boots in 2012.