After many months of acquisition talks, Birchbox has found a buyer: One of its own investors, the hedge fund Viking Global Investors.

Viking Global has acquired a majority stake in the beauty startup after agreeing to invest around $15 million of new cash into the business, multiple sources told Recode. Viking Global is also taking over a startup that currently has tens of millions of dollars in debt, sources say, as Birchbox tries to kick-start profitable growth to emerge from that shadow.

With the deal, Birchbox’s other investors — which include top venture capital firms including Accel Partners and First Round Capital — are getting wiped out, and are expected to walk away with nothing. Birchbox had raised nearly $90 million in financing from investors since its 2010 founding, and was once valued at nearly $500 million.

Birchbox had been for sale since at least last summer, when it held discussions with Walmart and other retailers to see if there was interest in a takeover. More recently, Birchbox engaged in serious sale talks with QVC in what would have essentially been a fire sale, multiple sources told Recode. Co-founder and CEO Katia Beauchamp would have no longer run Birchbox under such a deal.

A QVC spokesperson declined to comment.

While the Viking deal was a dud for most Birchbox investors, there is an upside for Beauchamp, who will stay in charge of the company, and for Birchbox employees, who were told on Tuesday that there wouldn’t be job cuts associated with the takeover. If Birchbox’s venture investors had fought the deal — which they could have done as debt holders who gave the company a lifeline in 2016 — the company and its employees could have been staring down bankruptcy.

“As an independent company with renewed investment, we are in a position to actively pursue plans that help further our mission and fuel our ambitious goals in the U.S. and in our global markets,” Beauchamp said in a statement to Recode. “As part of that strategy, we are prioritizing product innovation, the evolution of our digital experience, and scaled partnership opportunities.”

Birchbox says it has more than 2.5 million active customers and is operating in six countries. Recode had previously reported that the startup had revenue of around $200 million. But the company has struggled to grow fast — and profitably — at the same time, since acquiring new subscribers is expensive at Birchbox’s size, and the company’s model focuses on selling brands from other companies, which squeezes margins.

The startup was a pioneer in subscription commerce when it was founded in 2010 by Beauchamp and her co-founder Hayley Barna, who left in 2015 and is now a partner at Birchbox investor First Round Capital.

The pair came up with an innovative subscription business model to help women discover new makeup and haircare products without splurging on a whole bottle. Customers pay $10 a month for a shipment of four or five samples, and the company then hopes to sell them full-price versions of the items they discovered and liked. As of last year, around 35 percent of the company’s revenue came from the sale of full-price items.

But the startup ran into trouble in 2016 after being unsuccessful in raising a large new round of investment while competitors like Ipsy stole large chunks of market share. In the interim, Birchbox had to turn to venture debt in 2015, which hung over the company as revenue growth slowed and customer-acquisition costs soared. The company’s investors, including Viking and its venture capital backers, ended up giving Birchbox a $15 million lifeline in 2016 to help give it a buffer.

In the wake of these events, Birchbox underwent multiple rounds of layoffs in 2016, and put its store-expansion plans on pause as it embarked on a mad dash toward profitability. In the summer of 2017, a person familiar with the company’s finances told Recode that Birchbox was profitable on an Ebitda basis — a measure of operating profit that excludes items like taxes.

Sign up for the newsletter Recode Daily Email (required) By signing up, you agree to our Privacy Notice and European users agree to the data transfer policy. Subscribe