BlackBerry Ltd reported a massive quarterly loss on Friday due to an inventory write-down and asset impairment charges, and its shares fell more than 6 percent.

The company, which abandoned an attempt to sell itself last month, reported a net loss of $4.4 billion, or $8.37 a share, for the third quarter ended November 30. That compared with net income of $9 million, or 2 cents a share, a year earlier.

Excluding one-time items, the company reported a loss of $354 million, or 67 cents a share.

Revenue fell to $1.19 billion from $2.73 billion as increased uncertainty about the company's fate led to further sales erosion.

The company said it had agreed to a five-year partnership with Foxconn Technology Co Ltd to develop and manufacture a handset for Indonesia as well as other fast-growing markets.

Waterloo, Ontario-based BlackBerry pioneered the concept of on-the-go email, and for years its pagers and phones were must-have devices for political and business leaders. But in recent years it has ceded market share to Apple Inc's iPhone and a slew of smartphones powered by Google Inc's Android operating system.

A new line of devices that run on BlackBerry 10 software has failed to win back market share, prompting the company to consider a possible sale earlier this year.

Last month, BlackBerry shelved the sales process and opted to refinance by issuing $1 billion in debt to a group of long-term investors, including its top shareholder, Fairfax Financial Holdings.

Shares of BlackBerry were down 6.2 percent at $5.86 in trading before the market opened.

(Reporting by Euan Rocha and Alastair Sharp; Editing by Lisa Von Ahn)