U.S. drugmaker Pfizer Inc. and Ireland-based Allergan walked away from their $160 billion merger Wednesday, a major win for President Barack Obama, who has been pushing to curb deals in which companies move overseas to cut taxes.

Pfizer said the decision was driven by new U.S. Treasury rules aimed at such deals, called inversions. The merger would have allowed New York-based Pfizer to cut its tax bill by an estimated $1 billion annually by domiciling in Ireland, where tax rates are lower.

While the new Treasury rules did not name Pfizer and Allergan, one of the provisions targeted a specific feature of their merger — Allergan’s history as a major acquirer of other companies.

Allergan Chief Executive Brent Saunders said on CNBC television that the new Treasury rule would not stop the company from doing other stock-based acquisitions as soon as this fall. The new Treasury rule takes into account the past three years of a company’s deals.

“It really looked like they did a very fine job at constructing a temporary rule to stop this deal and obviously it was successful,” Saunders said.

Saunders said he would stay to run the standalone company with a focus on deals and research and development. Allergan also will move ahead with plans for its $40.5 billion sale of its generic drug business to Israel’s Teva Pharmaceutical Industries. It expects the transaction to close by June.

With the deal behind it, Pfizer said it would decide this year about whether to split off its hundreds of generic medicines into a separate business. It had put off making that decision until 2019 after announcing its deal with Allergan last November.

Pfizer will pay Allergan $150 million to reimburse expenses from its deal.

Shares of Allergan, which fell 15 percent on Tuesday, were up 1.3 percent at $239.86 in early trading. Pfizer edged up 1.2 percent to $31.74.

Pfizer has new products coming and plenty of money it could put to work with acquisitions, though not on the scale of Allergan, said Les Funtleyder, health care portfolio manager at E Squared Asset Management in New York, which holds Pfizer shares. It is not clear that Pfizer should definitely split into two, he said.

“It is true that these larger companies are a little unwieldy to manage,” Funtleyder said, “but there are plenty of strategies to keep them together and increase shareholder value.”

The decision to call off the deal came in part because Pfizer was concerned that any tweaks to salvage its deal with Allergan might have provoked new rules by the Treasury, a source familiar with the situation told Reuters on Tuesday.

Obama on Tuesday called global tax avoidance a “huge problem” and urged Congress to take action to stop U.S. companies from deals that allow it.

U.S. inversion rules have unraveled other mergers. U.S. drugmaker AbbVie Inc. abandoned its $55 billion takeover of Ireland-domiciled peer Shire in 2014 after the Obama administration cracked down on inversions. AbbVie had to pay Shire a $1.6 billion breakup fee.