LG is quitting the smartphone business it helped pioneer, abandoning its mobile ambitions after getting squeezed out by Apple and Samsung at the high end of the spectrum and such brands as Huawei at the other.

It will focus instead on connected devices, electric vehicle parts, robotics and its smart-home offerings, the South Korean company said Monday in a statement. “Moving forward, LG will continue to leverage its mobile expertise and develop mobility-related technologies such as 6G to help further strengthen competitiveness in other business areas.”

LG’s exit punctuates a drawn-out decline that took it from being one of the world’s top smartphone makers to an also-ran with less than a 2 percent share. Like other legacy players as Nokia and BlackBerry, it lost its footing as competition intensified.

“They went from an innovator to a significant laggard,” said Dan Ives, managing director of equity research at Wedbush Securities. “From the foldable phones, to the LG Wing, to other innovations that seemed good on paper, consumers frankly balked.”

More than 1.3 billion smartphones were sold worldwide last year, estimates show, a 12.5 percent decline attributed to the economic disruptions of the coronavirus pandemic and consumers holding onto their phones longer. Still, global sales are expected to reach $2.5 trillion in the next five years, Ives said. “I think they looked in the mirror and ripped the Band-Aid off,” he said, choosing to focus instead on their more successful operations in home entertainment and robotics.

Because users tend to stick with iOS or Android operating systems, manufacturers whose devices run on Android, such as Samsung and Xiaomi, probably will stand to gain from LG’s departure.

Apple commands about 19 percent of the global market, followed by Samsung’s 15 percent share.

As the company winds down its smartphone business, LG said it will continue to provide service support and software updates for customers who already own handsets for a period of time, but did not specify exact dates. The company also did not elaborate on potential layoffs as a result of the shutdown, stating only that “Details related to employment will be determined at the local level.”

LG said it expects to exit the mobile phone business by the end of July, but customers may be able to find existing models for sale after that.

LG had planned to pull its smartphone business into profitability this year. In January at CES, the tech industry’s biggest showcase, the company showed off the concept for a new model with a rollable screen, in which the display expands into a small tablet. The flashy innovation was seen as a response to Samsung’s foldable phones. But LG’s mobile wind-down puts an end to the rollable lineup.

The announcement comes as loyal customers of another legacy smartphone brand are awaiting a revival of sorts. Texas start-up OnwardMobility will license the BlackBerry brand for a new device expected this year that will run on Android and tout the trademark physical keyboard.

BlackBerry drew widespread attention earlier this year as investors scrambled to buy a collection of stocks, including GameStop and AMC, that were championed on trading forums and recorded enormous run-ups in price. Although BlackBerry shares have plummeted from their $25 high in January, the company is still trading at more than twice its value compared with last year, at about $8.

In recent years, smartphone manufacturers have confronted shifting habits of their customers, as people hold onto their devices for longer rather than indulge in the latest upgrade. That has hurt smartphone markers, which have responded in part by raising prices.

And as with LG’s mobile business, consumers have not always responded to hardware innovations. Adding to the competition for device purchases, Chinese manufactures including Xiaomi and Oppo have continued to gain traction with consumers, claiming about 11 percent and 8 percent of the global market in 2020, respectively, according to Gartner.