Paul McCartney has joined Johnny Depp in Disney’s “Pirates of the Caribbean: Dead Men Tell No Tales” in an unspecified role.

McCartney will appear in an extra scene that’s been added by directors Joachim Ronning and Espen Sandberg and producer Jerry Bruckheimer following the completion of principal photography.

The musician is the key component of the scene, a Disney spokesman said. No further details have been released.

“Dead Man Tell No Tales” is the fifth installment in the “Pirates of the Caribbean” franchise, starring Johnny Depp as Captain Jack Sparrow, Geoffrey Rush as Barbossa and Javier Bardem as Captain Salazar. Brenton Thwaites and Kaya Scodelario play new characters, and Orlando Bloom returns as Will Turner.

The film will be released May 26, 2017.

Keith Richards of the Rolling Stones appeared in 2011’s “Pirates of the Caribbean: On Stranger Tides” as Captain Teague, Sparrow’s father.

McCartney’s most famous film appearances came in the two Beatles movies — 1964’s “A Hard day’s Night” and 1965’s “Help!” He also starred with Ringo Starr in 1984’s “Give My Regards to Broad Street.”

The news was first reported by Deadline Hollywood.