Kristin Davis is headed back to the small screen.
The Sex and the City veteran has signed on for Bad Teacher, a comedic CBS pilot that stars Ari Graynor in the role made famous by Cameron Diaz in the 2011 movie by the same name.
While Graynor's Meredith Davis portrayed a lewd divorcee in search of her new husband, Davis will play the history teacher who serves as that character's main rival.
The impressive cast also includes Sara Gilbert (The Talk), David Alan Grier (In Living Color) and Ryan Hansen (Veronica Mars).
If picked up, Bad Teacher will mark Davis' first regular gig since her HBO smash went off the air.