It's a telly miracle! Sky and Discovery have reached a last-minute deal to save 13 of your favourite channels.

Only hours before TLC, Animal Planet and Eurosport were due to be pulled from the Rupert Murdoch-owned Sky service, both sides went back to the negotiating table to hammer out an 11th-hour agreement.

Discovery

Related: What Sky TV's dispute with the Discovery Channel means for your TV package

Sky boss Stephen van Rooyen told Digital Spy and other media: "We are pleased that we will continue to carry the Discovery and Eurosport channels on Sky.

"The deal has been concluded on the right terms after Discovery accepted the proposal we gave them over a week ago. This is a good outcome for all Sky customers."

Just to clarify, this deal means that Discovery Channel, TLC, Eurosport 1 and 2, Animal Planet, Investigation Discovery, Quest, DMAX, Discovery Turbo, Discovery Shed, Discovery Science, Discovery History, and Home & Health will not be leaving Sky's service tomorrow (February 1) as feared.

This content is imported from Twitter. You may be able to find the same content in another format, or you may be able to find more information, at their web site. GOOD NEWS! All our channels are staying on Sky. We can’t thank you enough for your patience & support. Best fans in TV! #KeepDiscovery pic.twitter.com/twy8PQqBp0 — Discovery Channel UK (@DiscoveryUK) January 31, 2017

Discovery released its own message to customers confirming the last-minute contract agreement on Twitter on Tuesday evening.

Giving credit to "the best fans in TV" for making this deal happen, Discovery's statement read: "We wanted you to be the first to know that we have reached an agreement which means all your favourite channels and programmes will be staying on Sky.

"We couldn't have done it without you."

Getty Images

(Discovery spent £1 billion for pan-European rights to the Olympics)

The two sides had previously been mudslinging very publicly in the press, with Sky saying last week it was "disappointed" that Discovery had turned down "hundreds of millions of pounds" to demand a new £1 billion agreement. It also accused some of Discovery's channels of being "in decline".

However, it was Discovery that first took the dispute public by accusing Sky of refusing "to pay a fair price" for rights to broadcast its biggest channels. All seems to be well now though... at least for the moment.

All of this feuding coincided with Sky going dish-free for the first time in a bid to compete with streaming services like Netflix and Amazon Prime Video.

Want up-to-the-minute entertainment and tech news? Just hit 'Like' on our Digital Spy Facebook page and 'Follow' on our

This content is created and maintained by a third party, and imported onto this page to help users provide their email addresses. You may be able to find more information about this and similar content at piano.io