After months of negotiations, Sony Music Entertainment has reached a licensing agreement with Spotify, sources tell Billboard, becoming the second major label to do so this year and paving the way for the streaming service to go public.

The deal, expected to close imminently, comes on the heels of Spotify’s multi-year licensing agreement with Universal Music Group announced in April. The terms of Sony’s deal with Spotify weren’t clear. Spokespeople for Sony and Spotify declined to comment.

UMG’s deal gives Spotify a break on the percentage of revenue that it must pays UMG in royalties as its subscriber base grows, going down to about 52 percent of revenue from 55 percent, sources have told Billboard. UMG’s deal also gives its artists the ability to limit their albums to Spotify’s paid tier for two weeks after release -- though no big acts have yet taken advantage of that freedom to date.

Who Wins, Who Loses in Spotify's Long-Term Deal With Universal Music Group

JAY-Z, whose Roc Nation label is distributed by UMG, hasn’t released his new 4:44 album on Spotify at all, despite making it available on other paid streaming services such as Apple Music and Amazon Music Unlimited after a week-long exclusive run on his own service, Tidal.

Spotify remains in licensing talks with Warner Music Group.

The terms of Spotify’s new deals with the labels could better position the streaming service to become profitable once it reaches a certain scale. At that point, Spotify will longer have to spend as much on marketing, though the company has never specified how many subscribers “scale” constitutes. Spotify’s net loss doubled last year to about $568 million on $3.1 billion in revenue, according to its latest filings. It now counts more than 50 million paying subscribers and more than 140 million total users. Apple Music, by comparison, announced it had 27 million subscribers last month.

Inside Spotify's Financials: Is There a Path to Profitability Or an IPO?

Spotify is under pressure to offer its shares to the public due to the terms of the $1 billion in debt it raised last year, which gets more expensive the longer Spotify waits. Spotify is considering a “direct listing” instead of a traditional IPO, an unusual move that could cut its interest payments, but could also mute investor buzz and appetite for shares, music executives tell Billboard.

Announcing his company's deal in an April release, UMG's chairman and CEO Lucian Grainge noted that "working hand in hand with these digital services brought us the industry’s first real growth in nearly two decades."