Ed Sheeran has said that one of his earliest songs was written about the death of a close friend.

We Are features on an early self-released live EP but never made it onto any of the singer’s multi-million selling albums.

A new biography about Sheeran reveals that the song was written about the death of his friend Stuart Dines while he was on a school ski trip in Cologne in 2006. We Are is said to have been played at Dines’ funeral.

In the new book, author Sean Smith wrote: "Ed had to come to terms with the death of someone he saw practically every day. He resolved to write a song about his feelings. He composed it, he said, ‘whilst I got round to actually accepting it’."

Dines’ father Robert was quoted as saying: "Ed was very, very upset, like a lot of the children."

Sheeran later called the track "the song that actually got me a record deal." He performed We Are during a set at south London pub The Bedford in 2010 when an executive from Atlantic was in the audience.

Biographer Smith has previously written books about George Michael, Kim Kardashian, Adele, Cheryl Cole and Jk Rowling. His Ed Sheeran book is published on November 15.