Britney Spears will guest star on Season 2 of the CW’s “Jane the Virgin,” Variety has confirmed.

The international pop star announced the news on her Twitter Tuesday afternoon, noting the the comedy is one of her “favorite shows ever.”

Spears will guest star as herself in the fifth episode back of “Jane” this fall.

“We are so thrilled that Rogelio’s ‘nemesis’ — Britney Spears — has agreed to appear on ‘Jane The Virgin’ in episode 205,” showrunner Jennie Snyder Urman said in a statement. “Personally, after hearing about their long standing fued (from Rogelio’s point of view), we are eager to hear Ms. Spears’ side of the story, which we assume is quite different. #TeamBritney”

On Tuesday at the Television Critics’ Assn. press tour, Urman added details on Spears’ storyline, saying, “It turns out, she’s a real nemesis of Rogelio, but the quality of their interaction is in dispute of what Rogelio thinks and what Britney thinks.”

Currently in the midst of her Las Vegas residency, Spears’ television credits include guest star gigs on “How I Met Your Mother,” in which she played a character (not herself), and an episode of “Glee,” in which she made a cameo as herself. She was also a judge on “The X Factor” on Fox.

“Jane The Virgin” Season 2 premieres Oct. 12.