Image copyright Getty Images Image caption Harry Styles is the second One Direction star to top the singles chart

Harry Styles's debut single Sign of the Times has broken Ed Sheeran's 13-week spell at the top of the charts.

The One Direction star has achieved his first number one as a solo artist with this release - the first from his self-titled debut album.

His song sold 3,000 copies more than Sheeran's, with just under 40,000 downloads and 3.5 million streams, the Official Charts Company said.

Sheeran's Shape of You fell to number two, while his Galway Girl is at three.

The Official Charts Company added that Shape Of You is still the most streamed song of the week, with nearly seven million plays.

Styles, whose debut album is released next month, is the second member of One Direction to top the singles chart, after Zayn Malik managed the same feat in 2016 with Pillowtalk.

Top five singles Artist Title 1) Harry Styles Sign of the Times 2) Ed Sheeran Shape of You 3) Ed Sheeran Galway Girl 4) Clean Bandit ft Zara Larsson Symphony 5) Drake Passionfruit

Sheeran has also retained his domination of the album chart, with Divide still on the top spot, followed by Rag 'N' Bone Man's Human and then Chainsmokers with Memories - Do Not Open.

Image copyright EPA Image caption Ed Sheeran still reigns supreme in the album chart

In its first week, Divide outsold the rest of the top 500 combined and became the fastest-selling album ever by a male artist.

Last month Sheeran also held 16 places out of the top 20 in the singles chart, including numbers one, two, three, four, five and six - not surprisingly, this was a chart first.

Top five albums Artist Title 1) Ed Sheeran Divide 2) Rag 'N' Bone Man Human 3) Chainsmokers Memories - Do Not Open 4) Drake More Life 5) Take That Wonderland

The album chart also saw the return of Mike + The Mechanics, whose new release Let Me Fly is at number nine in their first offering since 1996.

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