Actress Jennifer Beals arrives at the 2011 NHL Awards at the Palms Casino Resort June 22, 2011 in Las Vegas

*Jennifer Beals will join the cast of ABC’s “Castle” for a two-episode arc during February sweeps, has learned exclusively.

She will play Sophia Conrad, a smart, commanding and sexy CIA operative from Rick Castle’s past.

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.

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, also starring Penny Johnson Jerald as police captain Victoria “Iron” Gates, returns with new episodes on Monday, Jan. 9 at 10/9c on ABC.