Sony Corp reported its first profit in five quarters, helped by a recovery in its TV operations, and the Japanese electronics maker lifted its annual outlook closer to market expectations.

Operating profit at Sony, which competes with Canon Inc in cameras and Samsung Electronics Co in TVs, was 146.1 billion yen ($1.61 billion) in October-December, up from a 17.96 billion yen loss a year earlier.

The maker of Cyber-shot digital cameras shed jobs and shut plants following the global economic downturn and has been able to shore up the profitability of its ailing flat TV business.

For the year to March, Sony halved its operating loss forecast to 30 billion yen ($330 million) from 60 billion yen. The new outlook compares with a 227.78 billion yen loss a year earlier and beats a consensus for a 38.3 billion yen loss in a poll of 19 analysts by Thomson Reuters I/B/E/S.

Sony shares have gained 20 percent over the past three months through Wednesday, outperforming a 9 percent rise in Tokyo's electrical machinery index.

(Reporting by Kiyoshi Takenaka; Editing by Anshuman Daga)