In a move to generate some cash, Nokia Corp. (NOK) said Tuesday that it has penned a contract to sell its corporate headquarters in Espoo, Finland to fellow Finnish company and property investor Exilion Capital Oy.  In turn, the embattled phone maker will then re-lease the 540,000-square-feet building it has called home since 1997.

Nokia, which has been struggling quarterly and phasing-in the new Windows 8 platform to its handsets, sold the property for 170 million euros (US$220.4 million) in much-needed cash.  The transaction is expected to be completed by the year’s end.  Analysts and credit agencies have lambasted Nokia recently, including having their debt rating cut to “junk” status by Moody’s, Standard and Poor’s and Fitch.

Saying that the company is “very pleased” with the transaction, Nokia’s Chief Financial Advisor Timo Ihamuotila explained, “As we have said before, owning real estate is not part of Nokia’s core business and when good opportunities arise we are willing to exit these types of non-core assets.”  The financial chief also reiterated that the company plans to stay at their headquarters for a long time.

About 1,800 of Nokia’s staff work from the glass and steel building designed by architect Pekka Helin that overlooks the Gulf of Finland.  The company has eliminated more than 10,000 job cuts in 2012 on its quest curtain costs to achieve operational profits.  Nokia ended the third quarter with cash reserves of 3.6 billion euros (US$4.7 billion), down from 4.2 billion euros at the end of the April to June quarter (US$5.5 billion).

Shares of NOK have edged upward by 1% in morning trading to $3.30 and have recovered from a 16-year low of $1.63 in July, but are still off by 31% in 2012.