EXCLUSIVE: John Lithgow has been cast opposite Ben Affleck in The Accountant, the action thriller that Gavin O’Connor is directing for Warner Bros.

The pic has been in the works for a while and at one time had Mel Gibson directing and Will Smith circling the lead role of a government accountant who doubles as an assassin. Bill Dubuque wrote the script. Lynette Howell and Mark Williams are producing and Jamie Patricof and O’Connor are executive producing. Drew Crevello and Jon Gonda are overseeing for the studio.

Lithgow has been set to play Lamar Black, a tech magnate in the robotics field who hires Affleck’s character to look at his company’s accounting given some recent irregularities.

Lithgow is repped by UTA and Anonymous Content.