Japanese pharmaceutical firm Takeda has reached a takeover deal with Shire that values the firm at £46 billion.
The boards of both firms have finally agreed on the terms of the deal, settling on an offer of £49.01 per Shire share.
Takeda said it represents a premium of around 64% compared to the price of its shares in late March, when rumours of Takeda's interest began to swirl.
It ends weeks of wrangling, with a string of previous offers having been rejected by the Irish firm.
Shire chairman Susan Kilsby said: "We firmly believe that this combination recognises the strong growth potential of our leading products and innovative pipeline and is in the best interests of our shareholders, our patients and the communities we serve."
Takeda has agreed that up to three Shire directors will join the company's board once the acquisition is completed.
The takeover is set to come into effect in the first half of 2019.