After much hubbub, Sky and Discovery have come to an agreement.

The two media companies -- hours before their previous contract was set to expire, which would have seen TLC, Animal Planet, Eurosport, and more pulled from Rupert Murdoch's Sky -- have announced terms on a final deal for 12 channels. It's actually the same one offered to Discovery more than a week ago, but thanks to feedback from its viewers, Discovery has finally accepted the proposal.

Discovery Communications confirmed the last-minute contract agreement on Twitter on Tuesday. Also, via a statement on its website, the American company gave credit to "the best fans in TV" for pushing the deal along: "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."

Under the pact, channels like Animal Planet, Discovery HD, Discovery History, Discovery Home & Health, Discovery Science, Discovery Shed, Discovery Turbo, DMAX, Eurosport1, Eurosport2, Investigation Discovery, TLC, and Quest will not leave Sky on 1 February.

Sky, Europe’s largest pay-TV platform, has 22 million customers in the UK, Ireland, Italy, Germany, and Austria. It also announced Tuesday that it struck a deal with PBS America and is adding over 1,000 hours of programming from channels like History and National Geographic.