Britney Spears and Katy Perry's music producer has officially signed on as the third judge on 'American Idol'.

Dr. Luke, whose real name is Lukasz Gottwald, has nabbed the final spot to appear on the judging panel alongside Keith Urban and Jennifer Lopez on the show's upcoming 13th season.

A source told E! News that the 39-year-old musician, who is responsible for creating hits such as Katy's 'California Gurls,' Kesha's 'Tick Tok,' Britney's 'Hold It Against Me,' as well as Miley Cyrus' new track 'Wrecking Ball,' finalised his deal with FOX this week.

The American producer was reportedly approached to take the job after Justin Bieber's manager Scooter Braun, rapper Kanye West and Black Eyed Peas star will.i.am turned down the opportunity.

P. Diddy also allegedly turned down 'American Idol' because he didn't want to work with Jennifer.

The 43-year-old rapper, who dated the 'Dance Again' hitmaker for three years until 2001, reportedly rejected an offer as he felt things between them were still awkward.

A source previously said that the music mogul, whose real name is Sean Combs, ''felt it was a 'her or me' situation'' and ultimately decided he couldn't work in such close quarters with his ex-girlfriend, who has signed a $15 million deal to return to the show.