From Martin Scorsese to Steven Spielberg, Matt Damon has worked with some of Hollywood's greatest directors.

Now it's his turn to slide behind the camera.

Damon is planning to direct an untitled legal drama that he co-wrote with The Office star John Krasinski, TheWrap has confirmed.

Damon and Krasinski would both star in the Warner Bros. film, but no deals have been signed yet and the project is still described as being in the early stages.

Krasinski came up with the idea for the script and developed the project with novelist Dave Eggers. He then pitched the idea to Damon, and got the actor, who has made no secret of his desire to direct, excited about the premise.

The plot is being kept tightly guarded, but a spokesperson for Warner Bros. said it concerns a salesman (Damon) who arrives in a small town only to have his whole life called into question.

Damon has a packed schedule. He stars in the upcoming Cameron Crowe bittersweet comedy We Bought a Zoo in December. After that he's lined up the big-budget science fiction drama Elysium for Neill Blomkamp (District 9) and the HBO movie Liberace opposite Michael Douglas.

Krasinski is still headlining The Office over at NBC and also has a role in The Muppets, which hits theaters next month.

The project will be produced under Krasinski's Sunday Night banner. Damon and Chris Moore will also produce.

Variety first reported the news.