Paul McCartney has landed a small role opposite Johnny Depp in the new Pirates of the Caribbean movie.

The Beatles legend will make a brief appearance in Pirates of the Caribbean: Dead Men Tell No Tales, with producers adding the extra scene after having already wrapped production, reports

No details about McCartney's role had been revealed as WENN went to press.

The fifth instalment of the hit Disney franchise will feature the return of Depp as Captain Jack Sparrow, while Geoffrey Rush will reprise his role as Barbosa, and Orlando Bloom will be back as Will Turner, a character he last played onscreen in 2007's At World's End. Javier Bardem will portray the sequel's new villain.

Directors Espen Sandberg and Joachim Ronning have taken charge of the new Pirates of the Caribbean movie, which is due to set sail in May, 2017.

McCartney won't be the first rock icon to share the screen with Depp in the Pirates of the Caribbean franchise. Rolling Stones guitarist Keith Richards famously took on the role of Jack Sparrow's dad, Captain Teague, in 2007's At World's End and 2011's Pirates of the Caribbean: On Stranger Tides.

Meanwhile, McCartney is no stranger to Hollywood, having made his big screen debut in Beatles films A Hard Day's Night in 1964. He also appeared in Help! and Yellow Submarine, while his more recent acting credits include a stint on a live episode of Tina Fey and Alec Baldwin's hit TV comedy 30 Rock in 2012, and a voiceover role in TV cartoon series BoJack Horseman last year (15).