Japan’s Sony Corp halved its stake in camera and endoscope maker Olympus Corp to raise funds for a restructuring drive under which it is boosting investment in sensors and video games while pulling back from unprofitable segments.Sony said it would book JPY 46.8 billion ($390.4 million, roughly Rs. 2,433 crores) in capital gains as it lowered its stake in Olympus to 5 percent from 10 percent through a sale to JPMorgan.

“We decided on this move to strengthen our financial base and to secure funds for investing in growth,” a Sony spokesman said.

It is no longer the top shareholder, the companies said.

Sony bought shares in Olympus in a partnership announced in 2012, providing it with cash to fix its depleted finances after an accounting scandal forced it to restate several years of earnings.

Sony itself has struggled in the past few years amid a slump in the company’s electronics sales, although the shares have recently been recovering as restructuring efforts started paying off.

Sony said it will maintain its partnership with Olympus despite the lower stake.