One of Black Eyed Peas’ biggest hits was inspired by a U2 song.

Legendary music producer Jimmy Iovine has revealed that wrote I Gotta Feeling after working on the Irish group’s 2009 album No Line on the Horizon. Jimmy says came up with the tune after being impressed by the melody on the U2 track I’ll Go Crazy If I Don’t Go Crazy Tonight.

“I sent over to the studio to do some remixes on I’ll Go Crazy,” Jimmy is quoted as saying by British newspaper The Sun. “He works on them for two weeks, comes back and writes I Gotta Feeling.”

The Black Eyed Peas star is even said to have admitted to U2 frontman Bono and his band members that he had sought inspiration from him.

“The chords are U2 chords, 100 per cent,” Jimmy added. “Will even told them.”

I Gotta Feeling was the second single on The Black Eyed Peas’ fifth studio album The E.N.D. It was a huge hit around the world when it was released in 2009.

The track spent 14 consecutive weeks at the top of the Billboard Hot 100 and is the most downloaded song on iTunes of all time. It has sold over 14 million copies worldwide, making it one of the biggest pop songs ever.