Efraim Diveroli is suing Cooper, who is a producer on the film, Phillips and executives at Warner Bros., claiming they had unauthorised access to his Once a Gunrunner manuscript and could have used elements from it in the film.

The movie centres on a pair of drug users who become arms dealers after they win a $300 million (GBP205,000) contract to supply American allies with weapons in Afghanistan.

The screenplay is reportedly based on a 2011 Rolling Stone article and a subsequent book written by Guy Lawson, while Diveroli was in jail serving a four-year sentence after pleading guilty to one count of conspiracy. In 2008, he was accused of infringing upon the terms of his contract with the U.S. Government and being in violation of a pre-existing arms embargo.

According to TheWrap.com, Lawson contacted Diveroli about writing a book after the article, but when Lawson released Arms and the Dudes in 2015, he was listed as the only author. Diveroli claims he agreed to co-author the book as long as Lawson kept the details confidential and promised to keep him included in the plans to sell the rights to a movie studio.

After the book was released, Diveroli formed his own company, Incarcerated Entertainment, and wrote Once a Gunrunner. Diveroli's business partner, Ross Reback, then attempted to shop the manuscript to bosses at movie studios. A copy was also given to producer Elliot Kahn and his business partner, Simon Spira, who is the son of Warner Bros. executive Steven Spira.

Phillips was already reportedly working on the script, using the original Rolling Stone article, but Diveroli claims the filmmaker could have been given unauthorised access to the manuscript and used it for rewrites.

In the lawsuit filed in the U.S. District Court of Tampa, Florida, Diveroli is seeking damages and a jury trial for fraud and breach of a nondisclosure agreement.

War Dogs, which stars Jonah Hill and Miles Teller, is slated to hit U.S. theatres in August (16).