After a broad restructuring and clear out of top management, the Swedish firm is now tackling falling spending on networks by telecoms operators and weak demand in emerging markets.

Ericsson, which competes with Huawei [HWT.UL], Nokia and ZTE, said it expected the Chinese market to decline further due to lower 4G investments, but momentum was positive in North America, its biggest market.

"Last year we put a new strategy in place aiming at turning around performance and reaching a 10 percent operating margin," Chief Executive Borje Ekholm said on a conference call.

"We feel we are tracking well on delivering on that."

Ekholm still has work to do as its operating margin was -0.7 percent versus a goal of at least 10 percent by 2020 and at least 12 percent beyond 2020.

However, Ericsson's first-quarter gross margin, excluding restructuring charges, jumped to 35.9 percent from an adjusted gross margin of 29.9 percent in the previous quarter and was well above the analysts' consensus forecast of 32.1 percent.

Ericsson has said it will attain gross margins of 37-39 percent by 2020.

Half the margin improvement came from costs savings and a third was tied to the ramp-up of its 5G-ready Ericsson radio system platform, which is key to winning network upgrade deals, Chief Financial Officer Carl Mellander told Reuters.

Ericsson stock was the top performer on the pan-European STOXX 600 index, recovering to levels last seen in 2016, when it suffered a string of disappointing earnings reports leading to the firing of its former CEO last year and a big restructuring.

It said it had cut its workforce by more than 3,000 over the quarter and has now slashed 18,000 jobs since July.

In Stockholm, its shares traded up as much as 18 percent. At 1215 GMT, the stock was at 65.14 crowns, while Finland's Nokia, which reports on Thursday, gained 3.5 percent.

ZTE BENEFIT

Ericsson's quarterly loss fell to 0.3 billion crowns (25.6 million pounds) from 11.3 billion a year earlier and beat a mean forecast of a 2.4 billion loss in a Reuters analyst poll.

The company also said it made good progress in addressing poorly performing customer contracts in managed services.

Sales fell 6 percent in North America, but were up 6 percent on a currency-adjusted basis. Europe and Latin America was up 7 percent, with most of that growth coming in Latin America.

Ericsson and Nokia could also stand to benefit from a showdown between the U.S. government and Chinese telecom suppliers. ZTE was hit this week by a U.S. ban on exports by the Commerce Department over Iran sanctions violations. Both ZTE and telecom equipment market leader Huawei, also of China, face attacks from U.S. politicians on national security grounds.

In its digital services business, which helps telecom operator customers cut costs by moving to cloud and software-based services, gross margin leapt to 41.4 percent from negative 25.5 percent a year ago, excluding restructuring costs.

Digital services operating loss fell to 2.0 billion crowns from 8.8 billion crowns.

Ericsson's annual run rate for cost-savings reached around 8.5 billion crowns in the quarter and it is on track to reach a target of at least 10 billion by mid-2018.

As these flow through to the bottom line, Ericsson will rely less on new expense cutting programmes, Ekholm said.

"The big jump in profitability provides evidence that Ericsson's efforts at cost reduction, addressing loss-making contracts and investing in R&D is paying off," said Liberum analyst Janardan Menon, who has a "neutral" rating on the stock.

Redeye financial analyst Greger Johansson, who said he plans to raise his forecasts, said Ericsson's gross margin is typically better in the first than other quarters, so the question is how sustainable these improvements would be.

(Reporting by Olof Swahnberg and Helena Soderpalm; writing by Eric Auchard, Editing by Alexander Smith)

By Helena Soderpalm, Olof Swahnberg and Eric Auchard