Ed Sheeran's 'Thinking Out Loud' has become ubiquitous over the last year and a half - especially if you've been to a wedding during that time.

It has undoubtedly become the young singer's best-known song, breaking a number of streaming records - but Sheeran has revealed that it was written almost accidentally when he was helping out a songwriting mate of his, who happened to be broke at the time.

In an interview with The Mirror, he said that his friend Amy Wadge had asked him to include a song that she had co-written with Sheeran when he was 17 on the deluxe version of 'x' - and while she was at his house, they wrote 'Thinking Out Loud' together.

Sheeran first met Wadge at 17, and released the EP 'Songs I Wrote with Amy' in 2010 before making it big.

"She was going through financial troubles about a year ago," he said. "She drove to my house – my album was nearly done – and she asked if I could put a song from when I was 17 on the deluxe album, so she could get a little bit of money and pay the mortgage and bills and stuff. While she was there, we wrote ‘Thinking Out Loud.’ Now she never has to worry about money again.”

He added: “She’s got a family and two kids and stuff and every time I speak to her, she’s going on holiday. It’s really nice to see. It wouldn’t have happened if she hadn’t come down from Wales to see me.”