* Networks gross margin falls to 41.4% from 43.2% q/q
* Litigation, new contract costs weigh
* Ericsson sees strong demand for 5G equipment (Adds detail, comments, shares, byline)
By Helena Soderpalm
STOCKHOLM, July 17 (Reuters) - Telecoms equipment maker Ericsson posted quarterly earnings in line with forecasts but said it expected costs related to winning new contracts for its network business to hit profit margins in the second half of the year.
The result reported on Wednesday halted a streak of five previous quarters of earnings beats as strategic contracts aimed at carving out market share cut into profits.
Its shares fell 7.1% to 83.98 crowns in early trade.
Some analysts had also expected the company to upgrade its 2020 targets after showing steady profitability improvements in 2018 and 2019 following an industry-wide downturn in the middle of the decade in which operators cut spending.
Instead, Ericsson said it was on track to meet its financial targets for 2020 and 2022 due to strong demand for 5G equipment.
"We see strong momentum in our 5G business with both new contracts and new commercial launches as well as live networks," Chief Executive Borje Ekholm said in a statement. "To date, we have provided solutions for almost two-thirds of all commercially launched 5G networks."
The mobile network equipment maker has staked its recovery on growing demand for next-generation 5G equipment. Dutch semiconductor equipment maker ASML also said on Wednesday the rollout of the high-speed networks had helped it boost profit margins.
Some analysts think Ericsson could benefit from current turmoil surrounding market leader China's Huawei but the firm's chief financial officer said he had not yet seen any impact.
"We don't see it in the books but we are close to our customers in discussions," Carl Mellander told Reuters. "When we win business, its technology-based."
The company, which also counts Finland's Nokia as its main rival, has pledged to deliver an operating margin, excluding restructuring costs, of over 10% in 2020.
Quarterly gross margin in Networks fell to 41.4% from 43.2% in the previous quarter, mainly due to litigation settlement costs, strategic contracts and lower intellectual property rights licensing revenues.
Ericsson said the strategic contracts would boost margins in the long run but would hurt profitability in the near term.
"In the quarter we had a negative impact on gross margin and expect this impact to increase during the second half of the year," it said in the report.
Overall, gross margin rose to 36.6% from 34.8% a year ago. Excluding restructuring charges the margin fell to 36.7% from 38.5%.
Quarterly operating profit rose to 3.7 billion crowns from a 0.2 billion profit a year ago, in line with a mean forecast for a 3.7 billion profit in an analyst poll.
Sales rose to 54.8 billion crowns from 49.8 billion and topped forecasts of 53.2 billion.
In North America, continued 4G and 5G investments by all major customers lifted sales while deliveries of next generation equipment in South Korea and 4G deployment in mainland China boosted business.
$1 = 9.3873 Swedish crowns Reporting by Helena Soderpalm, Writing by Michael Kahn, Editing by Emelia Sithole-Matarise