STOCKHOLM—Swedish telecommunications equipment maker Ericsson AB Friday posted a 19% drop in second-quarter net profit, hit by hefty restructuring costs and strife competition.

Net profit at the world's largest network provider by revenue fell to 2.09 billion Swedish kronor ($245 million) in the second quarter from 2.58 billion kronor in the corresponding period a year earlier. Analyst had expected flat profit.

Revenue increased to 60.7 billion kronor from 54.9 billion kronor a year earlier, but the company's closely watched gross margin, which has been under pressure over past years, shrunk to 33.2% from 36.4% a year earlier.

The company said the restructuring charge of 2.7 billion kronor it booked against second-quarter earnings was mainly related to job cuts in Sweden, where the company is laying off over 2,000 employees, or more than 10% of its staff in the Nordic country.

The tough telecommunications gear market is getting tougher.

Ericsson and its rivals must spend big to develop new technologies, such as 5G—the next wireless broadband standard whose slim antennas could start appearing on rooftops at the end of the decade. But telecommunications carriers are cautious in buying new equipment as they strain to pass on costs to customers, and Ericsson's competitors are flexing their muscles.

Ericsson's direct challenger, Huawei Technologies Co. of China, has conquered a large market share in Europe and displays a voracious appetite.

Meanwhile, Finland's Nokia Corp. could take over Ericsson's crown as market leader if it succeeds in completing its proposed $16.6 billion acquisition of Alcatel-Lucent SA.

"Of course it is tough," Ericsson Chief Executive Hans Vestberg said in an interview. "Over the past 10 years, we've transformed the company dramatically to deal with that."

Since taking the reins in 2010, Mr. Vestberg has ditched the company's handset business and plowed investment into building cellphone network equipment and developing software to service those networks. The company has also recently expanded beyond supplying traditional telecommunications operators, placing more focus on television, media and cloud services.

But networks still make up nearly half of its revenue base and that market isn't expanding as much as it used to.

In the U.S., profitability is under pressure because of a slowdown in well-paid network deals. In China, growth is fast-paced but the contracts are less lucrative.

"The business mix continues to be a drag on gross margins," said Credit Suisse analyst Achal Sultania.

A row with iPhone maker Apple Inc. also dented the company's margin as revenue from patents declined.

Ericsson and Apple have been suing each other over alleged patent infringements in the U.S. In May, Ericsson took the battle to European grounds, filing suits in Germany, the U.K. and the Netherlands.

The Swedish company says Apple is refusing to pay royalties for using patented Ericsson technology that is critical to many aspects of the U.S. tech giant's popular mobile devices, such as iPhones and iPads.

Apple has characterized the royalties Ericsson has been asking for as "excessive" in a federal court filing linked to the dispute.

Mr. Vestberg said he still hoped to resolve the matter in an amicable way, but noted that negotiations with Apple were moving slowly.

"Our ambition is to clear this outside courts and have the industry move forward but right now we're not there," Mr. Vestberg said.

Access Investor Kit for Alcatel-Lucent SA

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=FR0000130007

Access Investor Kit for LM Ericsson Telefon AB

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=SE0000108656

Access Investor Kit for Alcatel-Lucent SA

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=US0139043055

Access Investor Kit for Apple, Inc.

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=US0378331005

Access Investor Kit for LM Ericsson Telefon AB

Visit http://www.companyspotlight.com/partner?cp_code=P479&isin=US2948216088

Subscribe to WSJ: http://online.wsj.com?mod=djnwires