Johnny Depp has settled a lawsuit with his former managers, a month before the trial was due in court.

The Pirates of the Caribbean actor sued the Management Group in January 2017 accusing them of spending millions of dollars without his permission, an allegation they denied. He was seeking $25 million in damages.

The Management Group, led by Joel and Robert Mandel, filed a countersuit alleging that Depp was responsible for his own financial woes due to a lavish lifestyle that cost $2 million a month to maintain.

They claimed that the 55-year-old actor spent millions of dollars on luxury homes, wine, art and a cannon used to scatter the ashes of writer Hunter S Thompson.

Depp has now settled the lawsuit meaning the planned trial on August 15 will not go ahead. The terms of the settlement were not disclosed.

A spokesperson for Depp said: "Johnny Depp is pleased to have achieved a settlement agreement with The Management Group following the legal action he took against the company in January 2017.

"The lawsuit taken out against The Management Group - and the subsequent settlement - is a further demonstration that Johnny is determined to take firm action to protect his personal and artistic reputation in the interests of his family and his career."

Depp is due to star in the Harry Potter prequel Fantastic Beasts: The Crimes of Grindelwald in November and his spokesperson said that he wants to "revert his full attention" to the project.

Johnny Depp in the Harry Potter prequel Fantastic Beasts: The Crimes of Grindelwald

The statement concluded: "Johnny extends his most sincere thanks and appreciation to the true supporters that have shown their loyalty to both him and his family over recent years."