One of the most important companies of the first dot-com boom, Yahoo, has reached the end of its life as an independent company. Yahoo’s board approved the sale of Yahoo’s core business to Verizon in a deal valued at $4.8 billion. The company’s shareholders and regulators must still approve the deal — the companies expect it to close in early 2017.

The deal represents a stunning decline for a company that was valued at more than $100 billion at its 2000 peak. Yahoo was never really able to adapt its technology and culture for a post-2000 internet that was focused on social media and mobile devices, and so it steadily fell behind rivals such as Google and Facebook.

After the Verizon acquisition, signature Yahoo properties like its search engine, email service, photo sharing site Flickr, and blogging platform Tumblr will presumably continue operating. But it’s hard to imagine that Yahoo will ever again play the kind of high-profile role online that it did two decades ago.

Ironically, what ultimately forced the hand of Yahoo CEO Marissa Mayer wasn’t the dismal performance of Yahoo’s online properties so much as an investment by Yahoo that worked too well. In 2005, Yahoo invested $1 billion in one of China's hottest technology startups, Alibaba. That bet paid off so spectacularly that by last year Yahoo’s Alibaba shares accounted for the large majority of the company’s value.

Shareholders worried that Yahoo management would eventually squander this windfall to prop up Yahoo’s declining internet businesses. The problem was that if Yahoo sold off the shares and gave the money to shareholders, it would trigger a massive tax bill. So instead of selling the Alibaba shares, Mayer was forced to sell the rest of the company, effectively putting herself out of a job.

It’s a humiliating end for Mayer, a Google veteran who joined Yahoo in 2012. Her turnaround effort didn’t work, and now Yahoo will be folded in with AOL, another struggling internet brand that was acquired by Verizon last year.

Yahoo had a perpetual media/tech identity crisis

The most successful companies in Silicon Valley — including Google, Facebook, and Apple — have an intensely technology-focused culture. These companies are obsessive about hiring the most talented engineers (and in Apple's case, designers) so they can build the best technology products. And this culture tends to be self-perpetuating — very skilled, highly motivated people like to work with other very skilled, highly motivated people. Once you have a critical mass of such people, it becomes easy to recruit more of them.

Yahoo never had the same kind of obsessive focus on recruiting technical talent. Paul Graham, a well-known Silicon Valley investor who sold his company to Yahoo in 1998, has written that even in the late 1990s, Yahoo was ambivalent about its status as a technology company.

"One of the weirdest things about Yahoo when I went to work there was the way they insisted on calling themselves a 'media company,'" Graham wrote. Yahoo employed a lot of programmers and produced a lot of software, of course — and still does. But it never made software as core to its identity as some of its major competitors.

That's probably because at the time Yahoo was founded, in 1994, no one had ever heard of an ad-supported software company. Back then, software companies sold their products in shrink-wrapped boxes at Best Buy. Yahoo had the same business model as CNN and the New York Times — build up a large audience and then make money by selling ads — so it was natural for Yahoo to think of itself as being in the same industry. But one consequence of this was that Yahoo didn't focus as much as it could have on recruiting the best programmers.

Marissa Mayer's roots are as an engineer at Google, and she made an effort to beef up Yahoo's technical talent. She instituted a more rigorous hiring process, and the company worked hard to hire more computer scientists, especially from top universities.

But there's little sign that these moves have changed the culture or improved morale among Yahoo's programmers. "I just try to ship products that I’m not ashamed of," a Yahoo executive told the New York Times in December. This is not an attitude that tends to produce excellent products.

At the same time, Mayer doubled down on the "media company" side of Yahoo's personality. In 2013, she hired television news anchor Katie Couric for Yahoo's news site. Couric's contract was renewed last year in a deal reportedly worth $10 million. Mayer also recruited gadget reviewer David Pogue from the New York Times to anchor Yahoo's relaunched technology news section.

But despite these investments, Yahoo didn’t have nearly the prestige of a New York Times or a CBS. The company was seen as something of an also-ran both in Silicon Valley and in the media world. Yahoo created technology products that people use and media properties that have an audience, but its attempt to be a technology company and a media company simultaneously resulted in an organization that was less than the sum of its parts.

Yahoo's core business seemed to be worth less than nothing

In the past few years, Yahoo's media and tech businesses were overshadowed by a third line of business: venture capital. At the same time that Yahoo's core business was in decline, its Alibaba investment was soaring in value. Indeed, earlier this year if you subtracted the value of Yahoo's major assets from the total market value of the company itself, you got a large negative number.

The uncharitable way to interpret this is that the core Yahoo business was actually destroying value. It's possible Mayer could have increased her stock price by simply announcing that she was shutting down all of Yahoo's websites and laying off all of its employees.

But there's another major factor in Yahoo's depressed share price: taxes. On paper, Yahoo's Alibaba share was worth around $25 billion. However, if Yahoo ever tried to sell its stake and pay out the proceeds to shareholders, it would have owed billions of dollars in taxes to the IRS.

After adjusting for these tax liabilities, it's possible to get a positive number for the value of Yahoo's core business. But it's still a small number. When Bloomberg’s Matt Levine crunched the numbers in December, he concluded that Yahoo's core businesses were worth just $1.7 billion, about 5 percent of Yahoo's overall market value at the time.

So Yahoo's search engine, email service, news site, and other properties might not literally be worth less than nothing. But the stock market didn’t seem very optimistic about the chances.

Yahoo came under intense pressure to sell itself off

The big fear of Yahoo's Wall Street critics wasn’t just that Yahoo management would fail to turn a profit; it was that they'd burn up billions of dollars in a futile effort to turn Yahoo around. Yahoo had enough cash in the bank to continue its current losses for a few more years, and after that it could have sold its Alibaba and Yahoo Japan stakes to buy itself more years of money-losing operation.

But while Yahoo's management and employees obviously like to have a big cash cushion, shareholders weren’t interested in endlessly subsidizing a money-losing business. And so last year, Wall Street started to ratchet up the pressure on Mayer to separate Yahoo's core internet business from its stakes in Alibaba and Yahoo Japan.

To mollify Wall Street, Mayer announced a plan last year to spin off Yahoo's Alibaba shares into a new holding company. Under tax law, a company can spin off part of its business tax-free if it's doing so for a legitimate business purpose, but it can't do so merely as a tax dodge. In the past, the IRS hasn't enforced this rule very strictly, but when Yahoo asked the IRS to bless its spinoff proposal, the IRS demurred. That meant Yahoo could face a multibillion-dollar tax bill. So in December, Yahoo announced that it was canceling the spinoff.

In a January letter, the hedge fund Starboard Value was scathing about Mayer's performance. "The management team that was hired to turn around the Core Business has failed to produce acceptable results," the firm wrote.

So Starboard urged Yahoo's board to sell Yahoo's core business to another company. That would provide Yahoo shareholders with several billion dollars in cash while avoiding tax liability for the Alibaba shares.

Starboard wasn't just making a suggestion. Starboard is an activist investment firm that buys a significant stake in company shares and then uses it as leverage to force management to make changes. In 2014, for example, Starboard successfully ousted the management of the Olive Garden after writing an epic 300-page slide deck criticizing the company's management.

Starboard threatened to take that same approach at Yahoo. "If the Board is unwilling to accept the need for significant change," the company wrote on January 6, "then an election contest may very well be needed so that shareholders can replace a majority of the Board with directors who will represent their best interests."

The threats worked. Mayer began shopping Yahoo around to potential buyers, and Verizon emerged as the leading contender.

Verizon buying Yahoo will look a lot like Verizon buying AOL

One reason Verizon was a strong candidate to acquire Yahoo is that the company has done this before. Verizon bought another struggling internet company, AOL, last year. And AOL has a lot in common with Yahoo. So the lessons Verizon learned from its AOL acquisition could prove valuable as Verizon digests Yahoo.

Both AOL and Yahoo are well-known internet brands whose best days are a decade or more in the past. Like AOL, Yahoo makes a lot of its money by creating internet content and selling ads against it.

When Verizon purchased AOL, it emphasized the company's portfolio of media brands, including TechCrunch and the Huffington Post. But as Matt Yglesias wrote for Vox last year, Verizon may have also been interested in AOL's ad technology business — and in particular how Verizon could use data gathered from its vast broadband and mobile networks to help AOL content companies target ads more effectively.

Either way, if Verizon was happy with its AOL acquisition, buying Yahoo, a company with a similar portfolio of technology, media, and advertising products, seems like a logical next step.

In recent years, scale has become increasingly important in the online advertising business. Advertisers prefer to make a few big ad deals rather than many small ones, and larger media companies are often able to command premium prices. With Yahoo and AOL under one roof, Verizon will be able to integrate their ad sales teams and offer advertisers packages that include media brands from both companies.

According to Yahoo's release about the deal, "Yahoo will be integrated with AOL under Marni Walden, EVP and President of the Product Innovation and New Businesses organization at Verizon" — suggesting that Mayer may end up out of a job, with the combined AOL/Yahoo unit reporting to Tim Armstrong, who was AOL's CEO prior to the Verizon sale and was asked to stay on afterward.