Shares of the company were up 7% in early trading.

A round of changes in the company's operations, greater investment on research and a geopolitical situation tilting in its favour has put Nokia firmly back in the global 5G rollout race just a year after CEO Pekka Lundmark took the reins, allowing it to gain ground on Swedish arch-rival Ericsson.

"Our 5G position has clearly strengthened ... we are winning back customers," Lundmark said on a call, confirming a rosier outlook first signalled in February.

Nokia last week got its first contract in China for supplying 5G radios, giving it access to one of the largest 5G markets, and the company is expected to get contracts from two more Chinese telecom operators.

While the Chinese market is competitive, it also gives a boost to volume, which Nokia missed out to Ericsson last year.

After having gone from initially describing the year as challenging to raising the outlook two quarters later, Lundmark has now chosen to be cautious and temper expectations of a faster turnaround.

He expects Nokia's results for the rest of the year would still take a hit from its loss of a $6.6 billion Verizon contract last year.

Its Network Infrastructure business, which caters to companies buying optical and fixed network products, grew 15% to offset a 2% fall in its Mobile Network unit, a business that has struggled over product missteps.

A shortage in global chip supply that has affected carmakers to smartphone makers is also affecting Nokia.

"We expect that the situation will continue in the second half of the year and well into 2022," Lundmark said in a post-earnings interview with Reuters. "At the moment, the demand is so strong that we could actually grow faster if there were more chips available."

Nokia said it now expects full-year net sales of 21.7 billion to 22.7 billion euros, up from its prior estimate of 20.6 billion to 21.8 billion euros, with an operating profit margin of 10-12% instead of the 7% to 10% expected previously.

The Finnish company's April-June comparable operating profit rose to 682 million euros ($808.51 million) from 423 million euros a year earlier, beating the 408 million euro mean estimate in a Refinitiv poll of analysts.

($1 = 0.8435 euros)

(Reporting by Essi Lehto and Supantha Mukherjee; editing by Terje Solsvik and Sriraj Kalluvila and Ana Nicolaci da Costa)

By Essi Lehto and Supantha Mukherjee