Sam Smith has made history with Writing’s on the Wall.

The 23-year-old singer delighted fans when it was revealed he would be singing the theme tune for the upcoming James Bond movie Spectre.

And following the release of the hauntingly beautiful song as a digital download on 25 September (15), the track was quick to fly off the shelves.

In fact, it was so popular that on Friday night (02Oct15) it was revealed that Writing’s on the Wall has become the first James Bond theme in history to ever top the UK singles charts.

“It was such an honour to be asked to write and record Writing's On The Wall and it's incredible that it's become the first Number one Bond theme song,” Sam told the Official Charts Company.

“It's been an unforgettable experience working with Barbara [Broccoli, Bond co-producer] and Sam [Mendes, Spectre director] to become part of this British legacy.

“I couldn't have done this without my fans - this is a special moment I'll never forget.”

Writing’s on the Wall sold a staggering 70,000 in combined sales and streams – 13,000 ahead of Justin Bieber’s What Do You Mean, its closest competitor.

Sam’s involvement in the Bond soundtrack had been rumoured for months before he confirmed it.

And the singer recently admitted it was more than a little difficult to keep it a secret.

“I had to lie through my teeth, which isn’t much fun," Sam told Britain’s The Sun newpsaper "My lying is really good now, when you say ‘genuinely’ people believe it.”

The track was penned by Sam and his writing partner James Napes. But director Sam also chipped in with tips on how the song should sound.

"It’s his film and vision and there were certain sonics and lyrics he felt maybe weren’t working and needed to work in certain ways," the musician explained.