Shares of Kofax Ltd. soared in afterhours trading today after the Irvine-based software maker announced it would be sold for $1 billion to Lexmark International Inc. in Lexington, Ky.

The company's shares closed in regular trading at a market value of about $658 million, and soared 45% on word of the deal.

Lexmark shares are up 4.5% in afterhours trading to a market value of about $2.7 billion.

The all-cash deal calls for Lexmark to acquire all outstanding shares of Kofax for $11 per share, a premium of nearly 50% on its share price at the close of trading today.

The transaction, which has been approved by the Kofax board and shareholders, who control about 25% of outstanding shares, is expected to close by June. Lexmark is set to nearly double the size of its enterprise software business to $700 million in annual revenue with the acquisition.

Kofax’s scanning software is used by 20,000 customers worldwide to streamline the flow of information, eliminate paper, speed productivity, reduce costs and improve customer service. The company reported revenue of $297 million last year.

Kofax, which was established in the U.K. in 1985, was the 7th largest software maker in OC with 295 local employees last year, according to Business Journal research. It has about 1,370 workers companywide.

The sale comes about week before the company was expected to delist its shares on the London Stock Exchange, where it was traded since 1996.

Kofax began trading on the tech-heavy Nasdaq Global Select market in December 2013 under the symbol KFX, raising $11 million in an initial public offering. It has since maintained dual listings.

The move further distanced Kofax from its U.K. roots as it sought to build a presence and awareness among U.S. investors.

The company moved its operational base from London to Irvine in 2009.