Benedict Fitzgerald had sued the Braveheart star for $10 million (£6.5 million) in February last year claiming he was misled over the scale of the film detailing the last days of Jesus Christ.

Fitzgerald had accused Gibson of fraud, breach of contract and unfair business practices, adding he agreed a salary which was "substantially less than what he would have taken had he known the true budget of the film".

No details have been released of the settlement agreed at Los Angeles superior court but a judge has cancelled a trial scheduled for June 3rd.

Mr Fitzgerald's original suit, filed in the Los Angeles superior court in February 2008, alleged Gibson "preyed monetarily on Ben, taking advantage of his unbridled enthusiasm for the project and with full cognizance of Ben's fundamental personal and spiritual beliefs".

It also claimed that Gibson told Fitzgerald he would be producing a small, low-budget project that would yield little profits; the film went on to gross over $600 million (£304 million) worldwide, with Fitzgerald claiming he was paid just $75,000 (£38,000) for his work on the movie.

The writer - who has also co-written an upcoming religious film entitled Mary, Mother of Christ - also alleged Gibson had spent tens of thousands of dollars on his children's education during filming in Italy as well as paying a $78,000 (£50,000).

However, several of Mr Fitzgerald's claims had been thrown out in recent hearings while Gibson's lawyers contended the actual salary amount at stake was far lower than claimed.

Gibson's legal team had also argued the Oscar winner did not know intricacies of the budget for The Passion of the Christ and his representatives have not commented on the settlement now reached.