(Bloomberg) -- Netflix Inc.’s long-term credit rating was upgraded two notches to blue chip status by S&P Global Ratings.

The streaming service is now rated ‘BBB’ by S&P, the lowest tier of investment grade, with a stable outlook. The ratings firm cited Netflix’s improving margins and cash flow expectations as reasons behind the upgrade in a report Monday. 

“We now view Netflix Inc.’s business more favorably because it continues to demonstrate market leadership despite the increasingly competitive over-the-top landscape, including its improving operating margins and transition to a sustainably cash flow generative business,” S&P wrote in the report. 

The stable outlook reflects expectations that the company will maintain its global leadership position in streaming video despite the increasingly competitive environment. 

Moody’s Investors service upgraded Netflix to the cusp of high-grade status in April.

While Netflix’s bonds had been rated BB plus, they’ve been trading like investment grade since last year, building on years of cash growth and the company’s commitment to forgo further debt offerings. 

Netflix relied on debt to fund its initial investment into original programming, borrowing billions of dollars to produce new TV shows, movies, stand-up comedy specials and documentaries all over the world. Skeptical analysts and investors once fret the company would be unable to pay its bills during an economic recession when the debt markets tightened up and customers canceled their subscriptions. 

But as the company has attracted more than 213 million subscribers, its need to borrow money has decreased. The company said in January that it no longer needed to borrow money to fund programming, and would buy back shares from investors. Netflix reports a profit, and has said it will be cash-flow positive starting next year.

Its shares have gained 24% in 2021, outperforming the S&P 500 Index. 

©2021 Bloomberg L.P.