Harry Styles has topped the UK charts with his debut single Sign of the Times. The former One Direction star knocked Ed Sheeran's Shape of You off the top spot to end his 13-week run.

The first track from his self-titled debut album, a piano ballad that has drawn comparisons with Mick Jagger and David Bowie, is Styles' first number one as a solo artist.

According to the Official Charts Company, Sign of the Times outsold Sheeran's track by 3,000 copies, garnering just under 40,000 downloads and 3.5 million streams.

But it's not all bad news for The Thinking Out Loud hitmaker, who has just dodged a copyright court case, as he retains his position at the top of the album charts.

Scoring 16 tracks in the top 20, Divide became the fastest-selling album by a male artist.

However, Styles might also challenge Sheeran's domination of the charts with the release of his debut album on 12 May as the two go head-to-head again.

And while Shape of You has been No 1 on the Billboard Hot 100 for 10 weeks, Styles' solo single is expected to make the top five in the US chart.

Harry Styles single
Harry Styles' debut solo single Sign Of The Times has been streamed six million times on Spotify so far Columbia

The Best Song Ever singer follows in the footsteps of former bandmate Zayn Malik, who was the first member of the boyband to go solo, releasing his debut solo album Mind of Mine last March. He also topped the singles chart with his first solo track, Pillowtalk.

Styles, who is set to star in WWII movie Dunkirk, will perform Sign of the Times on Saturday Night Live on 15 April and The Graham Norton Show on 21 April. It will be his first appearance without his bandmates.