Image copyright PA Image caption The rising cost of sports rights is behind the agreement, analysts say

Sky and BT have have signed a deal to sell their channels on each other's platforms.

Under the deal, BT will now supply its sports channels - which show UEFA Champions League and Premier League football - to Sky.

In addition, BT will be able to sell Sky's Now TV service - which includes Sky Sports, Sky Cinema and the Sky Atlantic channel - to its customers.

The deal comes as the firms face growing competition from online rivals.

Marc Allera, the chief executive of BT Consumer, told the BBC that the deal was partly so the firms could join forces against the potential online threat.

"A lot of technology companies are coming into the market with vast budgets, and changing the market. We need to ensure our customers get the best choice," he said.

In a complex market, potential rivals can also be partners, he added.

He said the Sky deal was a "clear indication" of the importance BT attached to how digital and TV markets were converging, adding the firm would bid fiercely for exclusive content.

Bidding is due to begin in the next Premier League football rights auction in February, and digital giants such as Amazon and Facebook could throw their hats in the ring for streaming rights.

However, Mr Allera said: "I wouldn't say [the deal with Sky] takes the pressure off at all... we believe in holding exclusive rights."

BT has spent more than £3.5bn on Champions League and Premier League football rights since 2012 in an attempt to compete with Sky.

For the 2016 to 2019 football seasons, BT agreed to pay £960m to show 42 Premier League games, and Sky agreed to pay £4.17bn to show 126 games.

For the seasons from 2019 to 2021, the number of games shown could rise to 190.

Image copyright EPA Image caption BT has exclusive TV rights for Champions League games until 2021

Sky boss Jeremy Darroch said: "This is great news for Sky customers who will be able to access all matches on Sky and BT channels from the Premier League, UEFA Champions League and Europa League directly with a single Sky TV subscription."

The new services will be available to BT and Sky customers from early 2019.

At present, BT customers can get BT TV via a box, an app, or online, and can only get a pared down version of Sky Sports.

Sky customers can get BT Sport at present, but only if they subscribe through BT.

Richard Broughton, research director at media analysts Ampere, called the deal "very unusual" because of the rivalry between the two firms, but said it was a consequence of the rising costs of sports rights.

"The new rights are up for renewal very soon and this is a pre-emptive shot from both companies to limit their exposure to damage should they not get key rights and also allow them to be a little less aggressive in their bidding."

Michael Hewson, an analyst with CMC Markets, said the BT-Sky deal seemed better for BT than Sky, "given that Sky will take BT's sport content while BT gets Sky's sports, cinema and Sky Atlantic channel, and could even gain more access to content further down the road".

'Huge disruptor'

The big online firms have been part of a seismic shift in how people access content.

On Thursday, Disney announced a deal to buy a large chunk of 21st Century Fox, including its 39% stake in Sky.

Media mogul Rupert Murdoch told Sky News he was selling Fox's entertainment assets in part due to the rise of online giants.

"[Amazon and Netflix] are growth companies... Amazon, I don't know how much they want to do. They are spending $5bn or $6bn I believe on new programmes, but it's basically to widen the appeal of [Amazon] Prime.

"Anyone who joins Prime seems to spend about $3,000 immediately on retail... you know, they are a huge disruptor if you look at what they're doing."

He said the new Fox company that remained would have the strength to bid for sports rights, but that all companies could be "threatened by big nonsensical bids from the likes of Facebook".