The news was announced Friday at the A&E show's San Diego Comic-Con panel, where producers also confirmed the drama would end with season five.

Rihanna is checking into A&E's Bates Motel.

Shortly after confirming that season five of the drama would be its last, producers announced Friday at San Diego Comic-Con that the pop icon has been tapped to assume on an iconic role on the Psycho prequel series.

Rihanna will take on the highly anticipated role of Marion Crane, the character played by Janet Leigh in Alfred Hitchcock's 1960 classic Psycho. As a refresher: Marion checked into the Bates Motel but never checked out after Norman — dressed as his mother, Norma — stabbed her to death in the shower. Watch Rihanna's announcement below.

"We wanted to thrust the iconic role into a contemporary spotlight and redefine it in a meaningful and exciting new way. We also heard Rihanna was a fan of the show, and we were huge fans of hers, so it was the perfect collision of creativity and fate," executive producers Carlton Cuse and Kerry Ehrin said in a statement released after the Comic-Con announcement.

Season four of the Psycho prequel series ended with Norma Bates (Vera Farmiga) being killed off after son Norman (Freddie Highmore) — in his "Mother" persona — filled their house with carbon monoxide.

"Season five is about the ways in which our show does and more specifically does not intersect with the events of Psycho," showrunner Cuse told The Hollywood Reporter after the season finale. "We are going to see a version of Norman that is much closer now to the one in the movie, but the way in which he acts and the events in the story will not be the same as the movie. They will cross paths with some of the events in the movie and lead to an ultimate resolution. What that resolution is and how that plays out is something that will be not disconnected to the movie Psycho but will be very much our own story in the same way the entire series has been."

For Rihanna, meanwhile, Bates Motel marks her biggest scripted acting role to date. The casting comes after the singer revealed that she was a big fan of the A&E series in a Vanity Fair cover story. Cuse — and the show's official Twitter account — both took note and came to the Grammy winner with the offer. Rihanna is repped by WME.

Other news from the panel included Farmiga's return to the series for its fifth and final season as Norma and as an executive producer. Co-star Max Thieriot will make his directorial debut and Nestor Carbonell will helm the series for a third time. Highmore also will write his second episode alongside Cuse and Ehrin. The final season will go into production in the fall and return in 2017.

Bookmark THR.com/ComicCon to keep up with all the highlights.