Danny Boyle was teased relentlessly by Ed Sheeran after learning Chris Martin was the director's first choice to feature in his new Beatles movie Yesterday.

The Shape of You hitmaker portrays a version of himself in the film, about the only man alive who can recall the songs of the Fab Four, but Sheeran was only approached for the part after the Coldplay rocker turned down the gig.

And the popstar made sure to use every opportunity to jokingly give Boyle and his team a hard time about his casting.

"He teased us rotten because he found out we'd asked Chris Martin first, so he never let us forget that," the director told NME. "And he accused us of asking Harry Styles second, which isn't true, but we did ask Chris Martin first, so he teases us rotten about that, but he gives as good as he gets."

Boyle added, "He's got a good sense of humour, which he needed to have otherwise it could have been quite unpleasant."

Although Boyle had originally wanted Martin to appear in Yesterday, screenwriter Richard Curtis thought Sheeran was the perfect choice as their lead character's mentor.

"Ed's the son I never had," Curtis recently told WENN. "I had orange hair when I was young, and Ed's got orange hair. The truth is that in some ways this film was about Ed, insofar as it's an Ed that hasn't succeeded, comes from Suffolk (England), and is engaged to a girl he was at school with.

"They're all sorts of ingredients from Ed's life that were in my head because we've known him for years."

Yesterday, which stars Himesh Patel alongside Lily James and Kate McKinnon, opens in cinemas this week.