Pfizer and Allergan announced that they’re canceling their planned merger because of new tax limitations on inversion deals, and this is apparently hitting the investment banks that were handling the transaction to the tune of $350 million. The merger between the two drug companies was estimated to be the biggest deal ever, and in a matter of days, it evaporated.

Pfizer - Allergan Deal

Pfizer, Allergan terminate merger for tax reasons

Just last week, Pfizer and Allergan said the Federal Trade Commission had requested more information about the proposed $160 billion merger. However, it wasn’t pushback there that blocked the deal. Pfizer was seeking an inversion deal, and since the U.S. changed the tax laws to keep major corporations from trying to set up shop out of the country through a merger with another company headquartered in an overseas tax haven, the main benefit Pfizer sought was not to be had.

If the drug maker was successfully able to flee the U.S. and its much higher corporate tax rates for Ireland, which has lower rates, it would have reduced its taxes by about $1 billion per year, said Reuters. The U.S. Treasury set up new rules that blocked the massive merger between Pfizer and Allergan.

Although the rules didn’t specifically name the two companies, one of the new provisions that’s mentioned in them is having a history of being a big acquirer of other companies, which Allergan does. An unnamed source reportedly told Reuters that the two companies decided to scrap the transaction entirely because Pfizer was worried that if they made changes in order to salvage it, the Treasury might enact even more rules to block it.

Overseer firms lose $350 million windfall

Allergan and Pfizer aren’t the only ones losing out by the transaction falling through. A post on ibankcoin suggests that the investment banks that were handling the deal are losing $350 million because it isn’t going through. Because of the massive size of the merger at $160 billion, the fees associated with managing and overseeing it were estimated to be around $350 million, with Pfizer paying about $120 million to $150 million and Allergan’s advisers splitting $160 million to $200 million.

The increasingly competitive environment in the finance world has shrunk management fees as firms slash rates in order to remain competitive, so losing this sizeable fee is certainly taking a bite out of the investment banks that were managing it.