Japan's Panasonic Corp reported a smaller-than-expected quarterly loss as it cut costs to fight a firmer yen and weak TV and digital camera demand, and it stood by its annual outlook for its net loss to shrink by half.

Panasonic saw sales of its electronics gadgets slow as the global downturn forced consumers to tighten their purse strings, while sluggish corporate capital spending hit demand for its factory automation equipment.

It is shutting 40 manufacturing sites and shedding 15,000 jobs to counter the headwind and better compete with rivals such as Sony Corp, Samsung Electronics Co Ltd and LG Electronics Inc.

Panasonic, which vies with Sony for the title of the world's largest consumer electronics maker, kept its net loss forecast of 195 billion yen ($2.06 billion) for the year to March.

That is half as big as a 379 billion yen loss a year earlier, but worse than the consensus of a 185 billion yen loss in a poll of 18 analysts by Reuters.

But Panasonic halved its loss forecast for the six months to September to a net loss of 100 billion yen, compared with its May forecast for a 195 billion yen loss.

On the operating level, which shows a company's core earnings strength and comes before restructuring charges in Panasonic's accounting method, it maintained its annual outlook of a 75 billion yen profit, up 3 percent on the year.

In an effort to improve profitability by boosting its presence in the green energy business, Panasonic is planning to acquire Sanyo Electric Co Ltd, the world's largest rechargeable battery maker.

The merged entity would be a dominant player in auto batteries for hybrid cars, which are enjoying strong demand.

In April-June, the maker of Viera flat TVs and Lumix digital cameras booked a net loss of 52.98 billion yen, down from a 73 billion yen profit a year earlier, and compared with analysts' estimate of a 58.3 billion yen loss.

The quarterly loss was much smaller than a 444.3 billion yen loss in the previous three months, but still lags the performance of its South Korean rivals.

Helped in part by a softer won, both Samsung and LG posted a bigger net profit in the latest quarter than a year earlier. Shares in Panasonic closed up 0.1 percent at 1,502 yen ahead of the announcement on Monday, slightly underperforming the Tokyo stock market's electrical machinery index, which rose 0.4 percent.

The stock has gained 41 percent since April, while the sector index put on 34 percent.

(Reporting by Kiyoshi Takenaka; Editing by Lincoln Feast)