By Stu Woo

ESKILSTUNA, Sweden -- The Trump administration's increasingly aggressive effort to cripple China's Huawei Technologies Co. has presented Ericsson AB the opportunity to lead the rollout of 5G technology around the world.

The Swedish company is emerging as the steadiest player in the $80-billion-a-year cellular-equipment industry, telecommunications executives and analysts say, because it makes a technically advanced product that one rival, Nokia Corp., was late to develop and that Huawei may not be able to make in the future because of recent U.S. measures.

While its competitors try to recover, Ericsson is moving forward after a costly yearslong restructuring has returned it to profitability. "The first step is for sure accomplished," Chief Executive Borje Ekholm said. "The next step is to find longer-term growth for the company."

The question for Ericsson is figuring out which technologies of tomorrow to bet on. Ericsson is testing equipment in several fields that 5G's superfast wireless speeds promise to unlock, such as driverless cars and remote-control mining machinery.

Washington is lobbying foreign countries to ban Huawei, saying Beijing could direct the company to spy on or sabotage communications. Both Huawei and Beijing say that wouldn't happen. Some foreign governments and wireless carriers have resisted American pressure, saying Huawei sells high-quality, low-cost 5G equipment. Some European governments say their cybersecurity agencies closely monitor telecom networks and can manage risks.

The Trump administration last month stepped up efforts to hamper Huawei by imposing export restrictions that make it harder for the company to buy computer chips that are produced using U.S.-designed tools -- a move that could prevent it from manufacturing advanced 5G hardware.

The U.S. has also sought to boost Huawei's rivals by providing loans to wireless carriers in developing countries so they can buy equipment from non-Chinese suppliers, among other moves.

U.S. Attorney General William Barr in February suggested that the U.S. government take a financial stake in Ericsson or Nokia, or both, to "make it a more formidable competitor and eliminate concerns over its staying power." The White House quickly backed away from the idea; a senior Trump administration official says it favors a free-market approach.

Mr. Ekholm declined to say whether Ericsson has held discussions with the U.S. about a potential government stake. Ericsson provides equipment for all three major U.S. carriers: AT&T Inc., Verizon Communications Inc. and T-Mobile US Inc.

The Stockholm-based company has been a telecommunications mainstay since Lars Magnus Ericsson founded it as a telegraph-repair workshop in 1876. It manufactured wooden phones in its early days and later made cellphones before selling its share in a joint-venture to partner Sony Corp. in 2011.

Ericsson struggled in the cellular-equipment industry against China's Huawei and ZTE Corp., which sold comparable products, often at lower prices.

When Mr. Ekholm became CEO in 2017, he concluded the company had spread itself too thin and should focus on making wireless equipment.

Ericsson sold a business that managed video-on-demand and digital-video-recorder, or DVR, services for cable companies and cut 23,000 jobs in a division that maintained networks for wireless carriers. The company then added 5,000 people in research-and-development to focus on wireless technology.

Among its key innovations are cellular antennas. Ericsson's use a new technology, called massive multiple-input multiple-output, or massive MIMO, that sends wireless signals in strong jets to different devices. Typical cellular antennas, which sit on steel towers or rooftops, send wireless signals in a wide cone, similar to the way a garden hose sprays water.

Wireless carriers want Ericsson's concentrated wireless technology, telecom executives say, because it enables fast connections and allows them to serve more customers using existing cellular towers. Building new towers is unattractive because it is a bureaucratic process that can cost tens of thousands of dollars.

Ericsson and Huawei sold 5G equipment with this feature last year, but Nokia didn't because of delays developing computer chips for its hardware.

Nokia now offers a comparable product, but the delay was a setback for its turnaround efforts, analysts say. After losing market share and struggling with profitability for several years, Nokia recently said it would change its CEO in September.

A Nokia spokesman said the company had the right long-term strategy and that its latest results showed an improvement in profitability.

From 2015 to 2019, Nokia's share of revenue in the cellular-infrastructure market fell from 24.4% to 19.2%, according to telecom research-firm Dell'Oro Group. Ericsson's share rose from 26.2% to 27.0% in the same period, while Huawei's lead grew from 27.5% to 30.7%.

Ericsson notched a victory this spring when it joined Huawei in winning 5G contracts to supply all three major wireless carriers in China, the world's second-biggest telecom-equipment market after the U.S. Nokia lost out on the significant Chinese bids.

The big question for wireless carriers and equipment makers, say executives, is whether Huawei can continue making massive MIMO 5G equipment with the quality that wireless carriers have come to expect. The technology requires supplies from the world's top semiconductor companies, but the Trump administration's recent actions may mean even foreign chip suppliers must seek Washington's approval to sell to Huawei.

A Huawei spokesman said the company was still assessing the full impact of the U.S. measures.

For now, Ericsson is assuming China has advanced its own semiconductor industry enough to continue supplying Huawei. Mr. Ekholm declined to comment on how Huawei's troubles might help Ericsson.

"Geopolitical discussion is not really for us," he said.

Mr. Ekholm said Ericsson is exploring how to sell equipment and services for coming technologies. In the industrial city of Eskilstuna, it has partnered with Volvo Construction Equipment to test remote control of machinery connected to 5G networks. The companies say the technology could improve safety and efficiency for miners, who would no longer have to put on safety gear and traverse through shafts.

The problem: It is still more efficient to work in person. The testers view video from the machine's cameras, but struggle with depth perception. Using virtual-reality goggles is better but presents other issues. "You can sit for 15 minutes, but then you will start feeling sick," said Calle Skillsäter, a Volvo technical specialist overseeing the test.

Ericsson's challenge is figuring out which unproven technology will become a reality, said Stefan Pongratz, a telecom analyst at Dell'Oro Group. "It'll take five or 10 years before some of these investments pay off," he said.

Write to Stu Woo at Stu.Woo@wsj.com