Jennifer Beals, Nathan Fillion Jennifer Beals, Nathan Fillion

Hold on to something, Castle fans: Another woman from Rick Castle's past is coming to town.

Photo Gallery: Check out TV's sexiest crime fighters


and The Chicago Code star Jennifer Beals will join the cast of the ABC drama for a two-episode arc during February sweeps, has learned exclusively. She will play Sophia Conrad, a smart, commanding and sexy CIA operative.

Sophia joins Castle (Nathan Fillion) and Beckett (Stana Katic) in the search for a fellow CIA agent who has gone rogue and is now the key suspect in Castle and Beckett's murder case. But Beckett soon becomes distracted by the fact that Castle and Sophia have quite a complicated history.

If the show's history of two-parters is any indicator, Beals' visit could be quite powerful. Two seasons ago, Dana Delany helped Castle and Beckett catch a serial killer (who almost blew up Beckett inside her apartment), and last year Adrian Pasdar played a Homeland Security agent who relied on our heroes to stop a dirty bomb from blowing up New York.

Castle Boss: Castle and Beckett's new secrets are a "ticking bomb"

Besides her breakout role in Flashdance and playing police Superintendent Teresa Colvin on The Chicago Code last season, Beals is best known for her work as Bette Porter on Showtime's The L Word. She also recurred on Fox's Lie to Me.Castle returns with new episodes on Monday, Jan. 9 at 10/9c on ABC. Beals' two-parter is slated to air in February.