Warning - contains spoilers

Image caption Planet Earth II has had consistently high ratings

The final episode of Planet Earth II has beaten the X Factor final in the Sunday night ratings.

The BBC One show, broadcast at the same time as ITV's X Factor, was watched by an average of 9.5 million viewers.

Seven million viewers tuned in to see Matt Terry crowned the talent show winner during the 20:00 to 21:00 slot.

But BBC One's Strictly Come Dancing had the highest ratings of the night, seen by 11 million between 19:15 and 20:00, according to overnight ratings.

BBC One's Countryfile, was watched by 6.9 million viewers, not far off X Factor's average.

Image copyright PA Image caption Strictly is heading towards its climax next weekend

Terry won the X Factor final with just 8% more votes than runner-up Saara Aalto, ITV revealed.

Meanwhile, rapper Honey G - who now has a record deal with Simon Cowell's label Syco - was never a serious contender, peaking with just 12.2% of votes in week eight.

The final results show's average audience of seven million is down on the 2015 final, when overnight figures showed that an 8.4 million tuned in.

This year, Sunday's audience peaked with 7.7 million to see Terry crowned at the end of the programme.

Strictly's audience peaked when 11.7 million saw Olympic gymnast Claudia Fragapane lose to Danny Mac in the dance-off.

That means Mac will compete for the glitterball trophy against Ore Oduba and Louise Redknapp in next week's final.

Planet Earth crew 'overwhelmed'

Planet Earth II has had consistently high ratings since it began airing just over a month ago.

Executive producer Mike Gunton said: "The whole Planet Earth II team have been overwhelmed by the reaction to the series and so pleased to be able to share the wonders of the natural world with so many people."

Sunday's episode included the story of the baby turtles in Barbados that were disorientated by artificial lights and walked inland after hatching, instead of going towards the sea.

However, after many messages of concern, the BBC Earth Twitter account reassured viewers: "Every turtle that was seen or filmed by the #PlanetEarth2 crew was collected and put back into the sea."

It also posted a video of how local conservationists from the Barbados Sea Turtle Project helped rescue as many turtle hatchlings as possible.

Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.