Image copyright Getty Images

Country star Shania Twain has beaten Wolf Alice to number one, in the closest chart battle of the year.

Just 764 sales separated the two acts, with Wolf Alice ceding an early lead to the Canadian star.

Twain's album Now is her first since 2002, and comes after a period where she struggled with debilitating vocal problems.

US rock star Tom Petty also returned to the chart this week, after his sudden death on Monday at the age of 66.

His 1993 greatest hits album, which features songs like Free Fallin', American Girl and Refugee, re-entered the Top 40 at number 14.

Image copyright Reuters Image caption Tributes were left on the star of Tom Petty and the Heartbreakers on the Hollywood Walk of Fame

Other new entries this week came from pop acts Demi Lovato (number five), Miley Cyrus (eight) and Hurts (21).

The long build-up to Christmas also started to exert its influence, with compilations by David Bowie, Michael Jackson and Feeder entering the chart, alongside a live album from Pink Floyd star David Gilmour.

Twain's chart battle with Wolf Alice came with a side-helping of celebrity endorsements, with Jeremy Corbyn petitioning his supporters to buy the London indie band's latest record, Visions Of A Life.

"After helping Labour beat the odds in the election, it's great to see @WolfAliceMusic doing the same in the charts," he wrote on Twitter, along with a link to their online store.

Twain, on the other hand, won the support of former One Direction star (and labelmate at Virgin EMI) Niall Horan.

Top five albums Artist Title 1) Shania Twain Now 2) Wolf Alice Visions of a Life 3) David Gilmore Live at Pompeii 4) Ed Sheeran Divide 5) Demi Lovato Tell Me You Love Me Source: Official Charts Company

Top five singles Artist Title 1) Post Malone ft 21 Savage Rockstar 2) Sam Smith Too Good At Goodbyes 3) Camila Cabello Havana 4) Dua Lipa New Rules 5) Avicii ft Rita Ora Lonely Together Source: Official Charts Company

In the singles chart, Sam Smith was knocked off the number one spot by US rapper Post Malone.

His song, Rockstar, swapped places with Smith's ballad Too Good At Goodbyes, which dropped to number two.

Love Island stars Chris and Kem scored the week's biggest new entry with Little Bit Leave It.

Despite hopes it could top the chart earlier this week, its sales tailed off and the duo ended up at number 15.

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