HP has come out of the left field, some might say, and snapped up flagging mobile phone maker Palm for $1.2 billion.

"HP and Palm today announced that they have entered into a definitive agreement under which HP will purchase Palm, a provider of smartphones powered by the Palm webOS mobile operating system", the two companies said in a joint statement.

The transaction, which has been approved by the HP and Palm boards of directors, will catapult HP back into the smartphone business and give it a chance to relive the heady days of the Compaq range of PDA devices.

"The combination of HP’s global scale and financial strength with Palm’s unparalleled webOS platform will enhance HP’s ability to participate more aggressively in the fast-growing, highly profitable smartphone and connected mobile device markets", said HP.

“We’re thrilled by HP’s vote of confidence in Palm’s technological leadership, which delivered Palm webOS and iconic products such as the Palm Pre. HP’s longstanding culture of innovation, scale and global operating resources make it the perfect partner to rapidly accelerate the growth of webOS”, said Jon Rubinstein, chairman and chief executive officer, Palm. ”We look forward to working with HP to continue to deliver industry-leading mobile experiences to our customers and business partners”.

Under the terms of the merger agreement, Palm stockholders will receive $5.70 in cash for each share of Palm common stock that they hold at the closing of the merger.