Jennifer Lopez has joined Steven Tyler in exiting American Idol.

Lopez announced on Friday she was leaving the talent competition after two years as a judge, a day after Tyler said he planned to return to rock 'n' roll. 

Speaking on Ryan Seacrest's radio show, she said,"I honestly feel like the time has come that I have to get back to doing the other things that I do that I've put kind of on hold because I love Idol so much."

Tyler said he's leaving after two seasons to rededicate himself to Aerosmith, the band he fronts. The rock star said he loved every minute on the hit Fox singing contest but added, "it's time to bring rock back."

"After some long ... hard ... thoughts ... I've decided it's time for me to let go of my mistress American Idol before she boils my rabbit," Tyler said in a statement, making a joking reference to the 1987 Michael Douglas-Glenn Close thriller Fatal Attraction.

First love is rock

"I strayed from my first love, Aerosmith, and I'm back — but instead of begging on my hands and knees, I got two fists in the air and I'm kicking the door open with my band."

The band is currently on a nationwide tour with Tyler and has an album due out in the fall.

Only original judge Randy Jackson remains on the Idol panel.

Lopez had expressed sadness on Thursday to hear that Tyler was leaving.

"I can't even imagine anyone else there right now because I've just spent two years sitting next to him," she said. "I love Steven, and we became close during that time. We were a great support for each other, on an adventure that neither one of us knew what it was going to be. So it's hard to hear that he won't be doing it."

Lopez also said Tyler's departure played a role in her decision to go.

The change in the judging panel comes as Idol comes off a season of ratings erosion. Its finale, which saw Phillip Phillips crowned as the new American Idol, drew 21.5 million viewers, the lowest in its 11-season history.

Tyler a raucous addition to judges

The Fox competition, which started off with Jackson, Simon Cowell and Paula Abdul as judges, has made various judging changes over the years. Ellen DeGeneres joined one season, and songwriter Kara DioGuardi was added as a fourth judge while Cowell and Abdul were still a part of the panel.

The addition of Tyler and Lopez two years ago added fresh star power to a show that, while still a powerhouse, was seeing its audience slowly wane, due to its long tenure and the flood of other talent shows on the TV airwaves.

Tyler added a raucous and sometimes flirtatious personality to the mix, while Lopez was much like Abdul's role as the nurturer and supporter. No one has had the acerbic tone that made Cowell the celebrated villain of the show for years; he's now on his own show, X-Factor, which recently went through its own judging shakeup and added Demi Lovato and Britney Spears.

Idol creator Simon Fuller lauded Tyler's contribution.

"Steven Tyler is a real Idol, a rock legend. If you had told me 10 years ago he would be a judge on American Idol, I would have thought it impossible," Fuller said in a statement.

"The fact that this became a reality and we had the pleasure of him gracing our stage for two seasons makes me very proud. I completely understand his desire to get back to his life as the singer in America's greatest-ever rock band. American Idol will miss him!"

Speculation about potential new panelists has focused on Mariah Carey and Charlie Sheen, with former Idol runner-up Adam Lambert getting a shout-out from his fans