How much longer can HTC hold on?

October 17, 2013, 7:34 PM UTC

By Kevin Kelleher, contributor

FORTUNE – First Palm. Then Nokia (NOK). Then BlackBerry (BBRY). Is HTC the next smartphone maker to go from a strong contender in the smartphone market to a troubled company in need of rescue?

It’s starting to look like it. Earlier this month, the company warned investors to brace themselves for the company’s first loss as a public company. Then a Taiwan tabloid reported last week that the company may be planning a merger with Lenovo (Lenovo is now reportedly mulling a bid for BlackBerry (BBRY)). That’s a far cry from a few years ago, when HTC was an early manufacturer of Android phones and a mover and shaker in the smartphone market.

HTC’s phones have long been considered in the same league with the best phones from Apple (AAPL) and Samsung, but its market share and stock price have both been shrinking: The stock, traded on the Taiwan Stock Exchange, has lost more than 90% of its value in the past two and a half years.

Founded in 1997, HTC has long been an innovative force in smartphones. In 2000, it developed one of the first phones with a touchscreen interface, and two years later it introduced the first smartphone powered by Microsoft (MSFT) software. In 2006, HTC went from being a contract manufacturer of phones to marketing handsets under its own brand.

MORE: Marissa Mayer’s 3 biggest decisions as Yahoo CEO

In 2007, when Google (GOOG) launched its Android mobile operating system, HTC quickly announced it was already at work on an Android phone. HTC launched its first Android phone in the fall of 2009, two years after Apple introduced the first iPhone. Named the G-1 or the Dream, the phone received early praise. A year later, when Google wanted to build its own Android phone, it turned to HTC to manufacture the device it later named the Nexus One.

In early 2011, as Android phones began to dominate the smartphone market, HTC saw its market share expand and its market cap surpass that of Nokia’s, which for years was the leading smartphone maker in the world. According to Canalys, HTC became the biggest U.S. smartphone vendor in the third quarter of 2011, surpassing Samsung and Apple and controlling nearly a quarter of the U.S. market.

Globally, HTC held a smaller share back then — 11% — but big enough to make it the fourth-largest smartphone company in the world. Recently, however, HTC has held about 7% of the U.S. market and even less of the global market: 2.8%, according to ABI Research, which noted that the company isn’t even ranked in the top 10 global smartphone makers. Samsung controls a third of that global market.

HTC’s decline accelerated as Google bought Motorola Mobility and as Apple won a court ban on some HTC handsets. Mostly, HTC lost its lead of the U.S. market to Samsung, a company with a long tradition of innovative engineering and a budget big enough to market its Galaxy line of phones aggressively. The Galaxy S3 and S4 became the most coveted Android phones in the U.S. Meanwhile, in emerging markets, Samsung and Apple held a lock on the high end while companies like LG, Huawei, ZTE,and Xiaomi began to capture the growing demand for low-cost smartphones.

MORE: How companies kill creativity

Over the past two years, HTC’s revenue and profit dwindled. On Oct. 4, the company pre-announced financial results that showed revenue would be down 14% from a year ago and that it would post a loss bigger than even bearish analysts were expecting.

Last week, HTC’s chairwoman Cher Wang optimistically predicted a strong recovery starting this quarter. HTC recently signed a marketing deal with Robert Downey Jr. to promote its handsets, an effort to address investor concerns that the company’s slogan “quietly brilliant” wasn’t resonating with consumers.

Even so, most analysts continued to express concern that competition in the smartphone market was too intense and that HTC had too many things to fix before it could declare a turnaround. The company may post a profit this quarter, but only because it’s selling its stake in a U.S. headphone maker. Beyond that, analysts see further restructuring, if not a buyout or merger with a larger company. Wang has repeatedly ruled out such a move.

Wang and HTC are clearly not wanting to go down without a fight. The company is talking with Microsoft about installing Windows Phone software as a “separate option” on its Android phones, although how this would work exactly remains unclear. This week, another report said HTC is developing three smartphones with Amazon, devices that the retail giant may offer for free. Amazon has had limited success with its Kindle Fire tablets, but such a deal could give HTC a needed boost.

That’s the good news. Now the not-so-good: On Friday, Taiwan’s Apple Daily reported that executives at HTC and Lenovo were in acquisition talks for a deal that would let Lenovo take over the HTC brand. Such rumors aren’t new, nor are rumors that Huawei or other PC makers might buy HTC. In the same way that lines are blurring between PCs and mobile devices, smartphone/tablet companies and PC makers are likely to consolidate. Increasingly, an HTC takeover seems likely within two years.

MORE: Samsung edged out Apple in U.S. phone sales last quarter

The decline of HTC echoes those of Palm, Nokia, and BlackBerry, not to mention the failed efforts of giants like Hewlett-Packard (HPQ) and Dell (DELL) to gain a foothold in the smartphone market. What makes HTC’s situation unique is it’s the first smartphone maker to power its phones with Android, which continues to be the most popular mobile OS in the world. HTC makes some of the best Android phones in the market, but that’s not enough anymore.

And that should give pause to all companies manufacturing and selling smartphones: No one seems exempt from a quick and irreversible decline in sales. In this market, every competitor is vulnerable.