The Tokyo-listed shares finished at 1,149 yen (£8), boosted by a weak yen and after the announcement that New York-based commercial property firm Chetrit Group was leading a consortium that agreed to buy the Madison Avenue skyscraper.

The sale, expected to close in March, comes as the firm undergoes a corporate overhaul aimed at returning to profitability after four years in the red.

In June, the company's hard times saw its stock value tumble below 1,000 yen a share for the first time since the era of the Walkman.

"Sony is undertaking a range of initiatives to strengthen its financial foundation and business competitiveness and for future growth," it said in a statement announcing the sale.

The company was "balancing cash inflows and outflows while working to improve its cash flow by carefully selecting investments, selling assets and strengthening control of working capital such as inventory", it said.

The deal would net Sony about $770 million after paying off building-related debt and transaction costs, it said, adding that businesses including its movie and music divisions would remain in the tower for up to three years under a lease agreement with the buyer.

The 37-storey building, home to about 1,500 employees and on one of New York City's best-known thoroughfares, opened in 1984 and was sold to Sony in 2002.

Sony was "re-evaluating" its outlook - which forecast a 20 billion yen ($223 million) annual net profit in the fiscal year ended March - "to take into account this sale and other factors".

Toshiyuki Kanayama, market analyst at Monex, said the sale was an "obvious plus for Sony's balance sheet, but does not instantly improve its creditworthiness or investability in the eyes of investors".

The rise also came as Tokyo's benchmark Nikkei 225 index jumped nearly 3pc as a weaker yen helped shares of exporters including Sony, which had climbed 5.67pc the day before after Goldman Sachs upped its recommendation on the stock to neutral from sell.

The maker of PlayStation game consoles and Bravia televisions lost a whopping 456.66 billion yen in its last fiscal year, with its massive restructuring including selling off its chemical division while investing 50 billion yen in camera and medical equipment maker Olympus.

Last year, the firm said it would cut about 10,000 jobs and spend nearly $1bn on an overhaul designed to shake up its product line and cut costs, which its chief Kazuo Hirai described as "urgent".

The sale announced Friday comes after Japanese media reported that the firm was also planning to sell one of its main buildings, in Tokyo's Osaki district, which accommodates Sony's struggling television division.

Japan's battered electronics sector including giants Sony, Panasonic and Sharp has suffered from myriad problems including a high yen, slowing demand in key export markets, fierce overseas competition and strategic mistakes that left its finances in ruins.

The industry has been awash in huge losses and credit rating downgrades, with rival Sharp saying last year it would put up real estate as collateral for bank loans - including its Osaka headquarters - to stay afloat.