The board of UK drug firm Shire has agreed to a £32bn takeover deal by American rival AbbVie, it has been confirmed.

Shire said the merger would see its shareholders entitled to £24.44 cash for each share.

The announcement comes on the deadline day for the deal to proceed, amid a record high for Shire shares.

It includes a premium of more than 50% to the stock price of Shire, based on its May 2 price ahead of the initial offer period, and 42% up on an updated June 19 offer.

Shire's share price was up more than 2% in late morning Friday trades.

"The boards of AbbVie and Shire are pleased to announce that they have reached agreement on the terms of a recommended combination of Shire with AbbVie," the pair said in a statement.

The deal comes after Shire reversed its initial opposition to a takeover.

On Monday, the board of London-listed Shire said it was ready to recommend a deal which would value it at £53.20 per share - a rise of more than £2 per share on AbbVie's last bid less than a week ago.

Under the terms of the cash and stock offer AbbVie, which wants to buy Shire to cut its tax bill and diversify its product line-up, would own 75% of the new entity - giving Shire investors a greater stake than the 24% previously proposed.

Dublin-based Shire, which makes drugs to treat rare diseases, had rejected four earlier offers and asked AbbVie to sweeten its bid in order to recommend an agreement to its shareholders.

AbbVie's pursuit of Shire comes just weeks after AstraZeneca fought off takeover interest worth £69bn from US drugs giant Pfizer.

Shire has been under pressure to secure new products, as it currently gets nearly 60% of its revenue from rheumatoid arthritis drug Humira, the world's top-selling medicine, which loses US patent protection in late 2016.

Earlier this week, Professor John Lyon, of Warwick Business School, said: "Shire may be headquartered in Dublin but it is managed from Boston where most of its medicines are sold.

"It is well known for targeting rare diseases with its medicines where accelerated drug development pathways are sometimes available once an orphan drug status is agreed with the regulatory bodies."