NEW YORK — Virgin Mobile USA Inc. is buying Helio LLC, a struggling cell phone carrier that was founded to bring the advanced features of South Korean phones to the U.S. market.

Virgin Mobile said Friday it would pay $39 million in stock for Helio, which has 170,000 subscribers, down from nearly 200,000 at the beginning of the year.

At the same time, British billionaire Richard Branson's Virgin Group and SK Telecom, the South Korean carrier that is the majority owner of Helio, will each invest $25 million in Virgin Mobile. That will give SK Telecom a 17 percent stake in Virgin Mobile.

Virgin Mobile indicated that it will keep operating Helio's advanced data services and its contract-based service plans. Virgin Mobile's own plans are prepaid and lack contracts.

But the Helio brand will likely be phased out, said Dan Schulman, Virgin Mobile's chief executive. It might be kept in the Korean-American market, where Helio is popular, he said on a conference call.

Before the acquisition closes in the next few months, Helio will be cutting costs, Schulman said. Helio had five company-owned stores and 50 company-owned kiosks and has already begun shutting them down.

The long-rumored deal is a poor payoff for Helio's founders. The company was launched in May 2006 as a joint venture of Internet service provider EarthLink Inc. and SK Telecom.

Since Helio was not a publicly traded company, data on its financials have been scant, but it has contributed to losses at EarthLink. Just last year SK Telecom invested an additional $270 million in Helio, cutting EarthLink's ownership share to about 22 percent. Friday's release said the company had an unsold inventory of 85,000 handsets, worth about $17 million.

The one bright spot for Helio was that its customers spend $80 per month on average for service, far higher than the industry average around $50. That's because Helio includes broadband data access for Web surfing, and downloads of music and games.

But Helio was unable to latch on to the burgeoning demand for data-capable "smart" phones. Apple Inc.'s iPhone and Research In Motion Ltd.'s BlackBerry have dominated that market in the last year.

Virgin Mobile had 5.1 million customers at the end of March, making it one of the largest U.S. "mobile virtual network operators," or MVNOs. Rather than owning their own network, MVNOs buy wholesale airtime from other carriers. It's a business model that has proved exceedingly difficult to profit from. Amp'd Mobile, ESPN Mobile and Disney Mobile have all shut down.

Five years ago, "We may have made it seem too easy in there, and a lot of people jumped into it," Schulman said. "The key to success to this business, in a word, is scale. Frankly, it really wasn't until we got into the 3- or 4-million range of customers that we were able to know that we would be able to have a successful, profitable business."

Virgin Mobile has been a relative success, but has problems of its own. It said in May that it expects to lose between 130,000 and 160,000 net subscribers in the second quarter.

Virgin Mobile shares fell 22 cents, or 7.4 percent, to $2.77 Friday.

Both Virgin Mobile and Helio use Sprint Nextel Corp.'s network, which makes the integration of the two businesses possible. Virgin Mobile said Friday that it had renegotiated the terms of the Sprint contract to reduce its costs through volume discounts.