Woody Allen and Amazon have ended their legal battle.

The filmmaker sued Amazon for $68m in February after the online giant ended his 2017 contract without ever releasing a completed film, A Rainy Day in New York.

Amazon responded that Allen, whose daughter Dylan has accused him of molesting her when she was a girl, breached the four-movie deal by making insensitive remarks about the #MeToo movement. Allen, 83, denies the allegations against him.

In papers filed on Friday in US district court, Allen and Amazon agreed that the case should be dismissed without prejudice. Terms were not disclosed.

A Rainy Day in New York was released overseas, but not in the US.

Allen’s career has slowed in recent years, with actors who had appeared in his films, among them Colin Firth and Rebecca Hall, saying they would not work with him again.

Others, including Scarlett Johansson and Samantha Morton, have defended him.