Gavin O’Connor is on board to write the sequel to “Suicide Squad,” and is also in talks to direct the film that stars Will Smith, Margot Robbie, and Jared Leto.

The movie is a top priority at Warner Bros. and looks to be one of the two DC properties (the other being New Line’s “Shazam!”) to begin production next year. Given the ensemble’s busy schedule, the shoot wasn’t expected to start until fall of 2018. So while there’s still time, the studio is eager to get someone on board to pen a script.

Zach Penn wrote a previous draft.

Following the news that David Ayer, who directed the first movie, would not be back, the open directing job has been one of the biz’s most highly-touted gigs.

Ayer directed the last supervillain tentpole, which was a huge hit for Warners — despite earning negative reviews — bringing in more then $745 million worldwide.

O’Connor was already on a shortlist that included filmmakers Jaume Collet-Serra and Mel Gibson, both of whom were considered the studio’s prime targets before they decided to tackle other projects. O’Connor has always seemed like a logical choice, given his history with the studio. He most recently directed the action-drama “The Accountant,” which Warner Bros. is already developing a sequel for. O’Connor is set to return to direct and Ben Affleck will be back to star.

O’Connor is repped by WME.