Katy Perry surprised fans with a performance at the Coachella music festival.

The US pop star appeared on the main stage on Sunday alongside record producer Zedd to perform their single 365.

Perry, 34, appeared to huge cheers from the crowd at the California venue and looked striking in a red jumpsuit with a rhinestone overlay.

Katy Perry
Katy Perry was a surprise addition to the Coachella lineup (Ian West/PA)

She told fans she “used to sneak in” to the festival, adding: “I’ve been doing Coachella for about 17 years.”

American Idol judge Perry had earlier teased her appearance on Twitter and a few hours before Russian-German producer Zedd was scheduled to take to the stage told fans to tune into the Coachella live stream.

Using the hashtag #GetYouAGirlWhoCanDoBoth, Perry said fans should finish watching American Idol before turning to Coachella.

Perry, a Coachella regular, had earlier been spotted with fiance Orlando Bloom and tweeted: “Feel like I’ve been doing full looks at @Coachella for as long as some of these people have been alive.”

The Coachella Valley Music And Arts Festival takes place each year over two weekends and regularly attracts some of the biggest artists to perform.

This year’s headliners are Childish Gambino, Tame Impala and Ariana Grande.