Spain's Telefonica ( TEF - Get Report) plans to acquire the U.K.'s O2 PLC in a deal that values the cell-phone firm at about $31.4 billion.

The pact is worth 200 pence a share. Telefonica will buy the company's assets in the U.K., Germany and Ireland, and expects to close the transaction in January.

O2 was formerly part of BT Group ( BT), the British telecom titan. The offer price is a 22% premium to O2's last closing price.