BERLIN  Nokia, the world’s largest cellphone maker, reported a $1.36 billion loss in the third quarter on Thursday as it wrote down the value of its wireless networks venture by $1.35 billion and global sales declined 20 percent.

The company said that its leading share of the global cellphone market remained unchanged at 38 percent. But it acknowledged that its lead in smartphones, the fastest-growing segment of the market, had fallen to 35 percent, from 41 percent, losing ground to Apple’s iPhone and Research in Motion’s BlackBerry devices.

Nokia’s quarterly loss was in contrast to a profit of $1.63 billion a year earlier.

Analysts said Nokia was being hurt by the slowing global economy, ferocious price competition and a weak portfolio of smartphones.

“Apple and R.I.M. are really starting to eat into Nokia’s lead in smartphones,” said Jan Dworsky, an analyst at Handelsbanken Capital Markets in Stockholm.