SoundCloud has just closed the necessary funding round to keep the struggling music service afloat. CEO Alex Ljung will step aside though remain chairman as former Vimeo CEO Kerry Trainor replaces him. Mike Weissman will become COO as SoundCloud co-founder and CTO Eric Wahlforss stays as chief product officer. New York investment bank Raine Group and Singapore’s sovereign wealth fund Temasek have stepped in to lead the new Series F funding round of $169.5 million.

SoundCloud laid off 40 percent of its staff last month, with 173 employees departing in an effort to cut costs. The company only had enough runway left to last into Q4, and today’s investor decision was viewed as a do-or-die moment for the company. Now it will have the opportunity to try to right the ship, or sail into an established port via acquisition.

SoundCloud declined to share the valuation or quantity of the new funding round. Yesterday, Axios reported the company was raising $169.5 million at a $150 million pre-money valuation. That’s a steep decline in value from the $700 million it was valued at in previous funding rounds. The new Series F round supposedly gives Raine and Temasek liquidation preferences that override all previous investors, and the Series E investors are getting their preferences reduced by 40 percent. They’re surely not happy about that, but it’s better than their investment vaporizing.

Raine will get two board seats for bailing out SoundCloud, with partner and former music industry attorney Fred Davis, and the vice president who leads music investments, Joe Puthenveetil, taking those seats.

While abdicating the CEO role probably wasn’t exactly what Ljung had hoped for, at least he gets to stay on with the company as chairman of the board. “This financing means SoundCloud remains strong, independent and here to stay,”

SoundCloud says its total revenue is now at a $100 million annual run-rate. If it can keep costs low and grow that number, it may eventually get to break even and no longer need infusions of investor capital.

TechCrunch broke news about the magnitude of the SoundCloud crisis last month. Sources from the company told us the layoffs had been planned for months, but SoundCloud still recklessly hired employees up until the last minute, with some being let go within weeks of starting. Employees told TechCrunch that the company was “a shitshow” with inconsistent product direction and dwindling cash. Ljung was seen as reluctant to be honest with the team, and unfocused as he partied around the world like a rock star.

Our report led to a flurry of follow-on coverage, prompting fans and artists to speak up in favor of the service. The rally was reminiscent of the love shown to Vine after Twitter announced it would shut down. Popular musician Chance The Rapper tried to get involved to save the company. He, like many other indie hip-hop artists, made their name on the platform as part of a genre that came to be called “SoundCloud Rap.” In the end, SoundCloud was saved when Vine wasn’t.

For now, music and other audio saved on SoundCloud is safe. But the company will need to find a way to make its subscription tiers more appealing and scale up its advertising despite having much less staff to drive the changes. If it can’t, SoundCloud could be back begging for cash in a year.

The new management should provide some additional confidence. I’ve interviewed both Ljung and Wahlforss in the past, and neither had answers to the big questions facing SoundCloud about its product direction, business model and the spurious copyright takedowns that have eroded its trust with musicians.

Trainor may be able to institute some more discipline at the startup. He was the CEO of Vimeo from 2012 to 2016, and has poached his former COO there to help run SoundCloud. They helped Vimeo fend off bigger rivals like YouTube by doubling down on what was special about the service: a focus on high-quality artful film rather than amateur viral videos. That experience makes Trainor a great fit to lead SoundCloud, which is fending off bigger rivals like Spotify and Apple Music.

SoundCloud’s best bet isn’t to battle them directly, but double down on the user-uploaded indie music scene, including garage demos, DJ sets, unofficial remixes and miscellaneous audio you can’t find elsewhere. Whether it stays independent long term or tries to seduce an acquirer, SoundCloud will benefit from spotlighting its unique community of creators and hardcore listeners.