Shares of Micro Focus soared more than 90% on Friday after Canadian software company OpenText agreed to buy the enterprise software maker in an all-cash deal valuing the British company at $6 billion including debt.

In a push to expand its enterprise information management business, OpenText said on Thursday it would pay 532 pence ($6.30) in cash for each Micro Focus share, a 98.7% premium over Micro Focus's closing price on Thursday, giving the company a market capitalization of about $2 billion.

Micro Focus' shares soared to a more than one-year high of 518 pence in early trade.

The UK company said it considered the terms of the deal to be "fair and reasonable" and would recommend shareholders vote in favour of the acquisition, according to the joint statement on Thursday.

Micro Focus, based in Newbury, Berkshire, has $4.4 billion debt on its balance sheet, according to its latest earnings report.

OpenText will fund the deal by raising $4.6 billion in new debt, $1.3 billion in cash and drawing $600 million from its existing revolving credit facility.

During a call with analysts, OpenText Chief Executive Mark Barrenechea said the company can stabilize Micro Focus' business and accelerate its cloud transition.

Micro Focus helps customers maintain and integrate legacy IT technology, a business it has grown by acquiring legacy technology such as mainframe computer software used by banks, retailers and airlines.

OpenText, one of Canada's largest software makers, said it expects cost savings of $400 million after the deal closes. The deal will be subject to regulatory approval.

The company's U.S-listed shares were down 4.8% in after-hours trading on Thursday.

Barclays served as financial adviser to OpenText on the deal, which is expected to close in the first quarter of 2023.

Micro Focus was advised by Goldman Sachs and Numis. ($1 = 0.8448 pounds)