Justin Timberlake Goes to Work With Ex Cameron Diaz

Credit: Jeff Kravitz/MTV Hope for Haiti Now via Getty Images

Justin Timberlake is back with ex Cameron Diaz -- on the big screen.

He has signed on to star alongside her in the comedy The Bad Teacher.

According to Variety, Diaz, 37, plays a middle school teacher who gets dumped by her boyfriend.

She begins crushing on another teacher, played by Timberlake, 29, who happens to be dating a fellow teacher, played by actress Lucy Punch.

Shooting begins later this month.

In 2007, after nearly four years together, Diaz and Timberlake called it quits. At the 2007 Academy Awards -- just after their split -- Diaz reportedly had a temper tantrum when she saw Timberlake flirting with Jessica Biel, his current girlfriend, and confronted him angrily. But things seem fine for the exes these days. In January, they were spotted mingling and laughing at the Hope for Haiti Now telethon in L.A.