(Reuters) - Keysight Technologies Inc (>> Keysight Technologies Inc), a maker of electronic measurement instruments, said it would buy Britain's Anite Plc (>> Anite plc) in a cash deal valued at about 388 million pounds.

Shares in Anite, which tests handsets and telecom networks, rose as much as 25 percent on Wednesday morning on the London Stock Exchange.

Keysight's offer of 126 pence per share represents a 22.3 percent premium to Anite's closing price on Tuesday.

The acquisition will help Keysight expand its portfolio into software design and validation, Chief Executive Ron Nersesian said in a statement.

"We think that this will go down to the wire as investors look to sniff out a competitive bid", Panmure Gordon analyst George O'Connor said, adding that Agilent Technologies Inc (>> Agilent Technologies Inc) could be a potential rival.

Agilent was not available for comment outside regular business hours.

Anite has been struggling as restructuring at its customers Blackberry Ltd (>> BlackBerry Ltd), Nokia Oyj (>> Nokia Oyj) and Motorola Solutions Inc (>> Motorola Solutions Inc) has led to the cancellation of several orders, finnCap analyst Lorne Daniel said in a note.

Santa Rosa, California-based Keysight, which was spun out of Agilent last year, plans to buy Anite using existing cash, according to the statement.

The deal, recommended by Anite's board, is expected to close in October 2015 and add to Keysight's earnings in the first year after that, the companies said.

Keysight was advised by Goldman Sachs, while Anite's financial advisers were Evercore, Jefferies and Canaccord Genuity.

Shares in Anite were up 22.8 percent at 126.5 pence at 0805 GMT.

(Reporting By Mamidipudi Soumithri in Bengaluru; Editing by Anupama Dwivedi)