Shawn Mendes has scored his first ever UK number one, ending Justin Bieber’s reign on top of the chart in the process. The 17-year-old won the chart battle this week with ‘Stitches’, taken from his debut album Handwritten.

Shawn MendesShawn Mendes is on top of the UK chart with ‘Stitches’.

‘Stitches’ first entered the UK chart 17 weeks ago, in October of last year, when it debuted at number 97. It then hit the top 40 in December and began steadily climbing to the top spot. Only one other song in UK chart history has taken longer to reach number one, Ed Sheeran’s ‘Thinking Out Loud’, which took 19 weeks.

More: Shawn Mendes Scores US Chart Topper With Debut Album ‘Handwritten'

The race between Mendes and his fellow Canadian Justin Bieber was extremely close, with ‘Stitches’ winning by just over 1,500 combined chart sales ahead of ‘Love Yourself’. However ‘Love Yourself’ notched up more streams with 3.72 million plays against ‘Stitches’’ 3.05 million.

Bieber still dominates the top five however, with ‘Love Yourself; at two, ‘Sorry’ at three and ‘What Do You Mean’ remaining at number four. This week’s top five is rounded off by 99 Souls, who move up four places with 'Girl Is Mine' in its eighth week inside the top 40.

More: Justin Bieber Sets Another UK Chart Record As He Fills The Top Three Singles Spots

Elsewhere in the chart, Snakeship have entered the top 10 for the first time with their Tinashe and Chance The Rapper collaboration 'All My Friends' moving up to number eight. Earning their highest UK chart position yet are The 1975 with ‘The Sound’, which debuted at number 15.

Watch the video for Shawn Mendes ‘Stitches’ here: