Sergio Dionisio/Associated Press

Two big retail chains on opposite sides of the Atlantic are betting that prescriptions, paper towels and nail polish are global goods.

On Tuesday, the American drugstore chain Walgreen Company agreed to buy a 45 percent stake in Alliance Boots, the European pharmacy retailer, for $6.7 billion, in a deal that will allow both companies to extend their worldwide reach.

Walgreen, which could gain full control of the company by 2015, can take advantage of Alliance Boots’ operations in Europe and several emerging markets. Alliance Boots gets a long-sought foothold in the United States.

The deal will create one of the world’s largest drugstore and pharmacy retailers, with more than 11,000 stores in 12 countries, as well as a wholesale pharmaceutical business with operations in 21 countries.

“This is a chance to create the world’s first truly global pharmacy and health care enterprise,” Gregory Wasson, chief executive of Walgreen, said in an interview. “There’s nothing else out there that can match it.”

Related Links The press release

The deal represents the latest strategic maneuver by Alliance Boots’ executive chairman, Stefano Pessina, to turn the European company into a global retailer.

Over the years, the Italian billionaire has expanded Alliance Boots through a number of international acquisitions. In 2006, he helped secure a $12 billion merger between Boots and a rival, Alliance Unichem.

A year later, he joined forces with the private equity firm Kohlberg Kravis Roberts to acquire Alliance Boots for $22 billion in the Continent’s biggest leveraged buyout.

In recent months, Mr. Pessina pursued an acquisition or merger, either in Asia or in North America, to continue Alliance Boots’ international expansion, according to a person with direct knowledge of the matter.

“If we want to be a global company, we need a presence in the U.S.,” Mr. Pessina, who will reinvest his proceeds from the deal to gain an 8 percent stake in Walgreen, said in an interview. “We will continue our expansion into new markets in Asia and Latin America.”

Under the terms of the deal, Walgreen will buy a 45 percent stake in Alliance Boots for $4 billion in cash and another $2.7 billion in company stock. Kohlberg Kravis Roberts, which had invested $1.8 billion in Alliance Boots, said it would receive $1.8 billion in cash and around $200 million in Walgreen stock.

The drugstore chain has the option to buy the remaining 55 percent stake in Alliance Boots three years after the deal closes, for $9.5 billion in cash and stock. If that happens, Walgreen would also assume the European company’s debt, which currently stands around $11 billion. The final price might vary depending on the performance of Walgreen’s shares and foreign exchange fluctuations.

The deal comes as Walgreen faces weakness in its home market. On Tuesday, the company reported an 11 percent drop in its earnings, to $537 million, for the three months through May 31.

Walgreen shares closed about 5.8 percent lower in New York.

The deal is the latest in a flurry of acquisitions of European targets by American companies. So far this year, the combined value of European mergers and acquisitions, excluding Walgreen’s acquisition of Alliance Boots, has reached $99.5 billion, according to the data provider Dealogic. Companies in the United States account for around 43 percent of the acquirers.

The $99.5 billion figure is a 21 percent decline over the same period in 2011, but is higher than the combined $72.7 billion of deals so far this year in the United States.

As part of the deal, Mr. Pessina of Alliance Boots and Dominic Murphy, a partner at Kohlberg Kravis Roberts, will join Walgreen’s board, while Mr. Wasson of Walgreen and several of the company’s executives will join the Alliance Boots board.

Walgreen said it expected annual costs savings of up to $150 million in the first year, and as much as $1 billion in savings by the end of 2016. The deal is expected to close by Sept. 1.

Goldman Sachs, Lazard and the law firms Wachtell, Lipton, Rosen & Katz and Allen & Overy advised Walgreen, while Centerview Partners and the law firms Darrois Villey Maillot Brochier and Simpson Thacher & Bartlett advised Alliance Boots.