Sydney: CBS Corp. agreed to buy struggling Australian broadcaster Ten Network Holdings Ltd, gaining an overseas platform for its video-on-demand service and squeezing out a potential bid by News Corp. co-chairman Lachlan Murdoch.

The deal saves Ten Network from collapse, after the New York-based media giant pledged immediate financial support to keep it running. The most-watched US network enters a crowded market for streaming services in Australia, where it will face competition from Netflix Inc. and several local platforms.

Ten had crumbled under the cost of buying programs from the US as advertising revenue plunged. The Sydney-based broadcaster was valued at just A$59 million ($47 million) before its stock was suspended from trading in June, and was also in the sights of Murdoch and local media mogul Bruce Gordon. No value for the deal with CBS was provided.

With Netflix and other streaming services grabbing audience share, CBS will turn Australia into an overseas test market for its video-on-demand service. The US company, which airs “The Big Bang Theory" and “NCIS," said earlier in August it would take CBS All Access, as it’s called, offshore in 2018—starting with Canada.

“This acquisition not only presents CBS with considerable broadcasting opportunities in Australia, but also allows for further multi-platform distribution and growth," Armando Nunez, chief executive officer of CBS Studios International, said in a statement. CBS said the price it’s paying for Ten gave it confidence it could grow the business.

In the US, CBS All Access includes a live feed of the TV network as well as on-demand shows. Like Netflix, CBS is also making some original shows for the service and plans to release a new Star Trek show on the platform in September.

In Australia, Murdoch and Gordon had been guarantors to Ten’s secured A$200 million facility with Commonwealth Bank of Australia, but backed off from providing further support as Ten sought a fresh loan of about A$250 million.

The pair’s investment vehicles later got together for a potential joint bid for Ten, but the deal was conditional on legislation passing through the Australian parliament to ease media ownership rules. That bill is currently stalled.

Ten ultimately ran out of time to push through its three-part transformation program to survive on its own. That plan involved cutting costs, renegotiating US programming contracts and reducing the broadcasting license fee paid to the government. Bloomberg