Kevin Costner has settled a lawsuit with movie bosses at Morgan Creek Productions, a week before the case was scheduled to go to trial.

The actor accused the executives of hiding profits from his 1991 film Robin Hood: Prince of Thieves from him, and sued them for the cash in July, 2012.

In his lawsuit, he wrote, "If you're hoping to earn profits based on the success of your film and you want to be paid on a timely basis, then one company you certainly do not want to do business with is Defendant Morgan Creek Productions."

Costner claimed he had received no financial statements from Morgan Creek partners in 2010 or 2011, and the statements were late from 2004 to 2009.

He accused Morgan Creek of diverting money by assigning foreign distribution rights on Robin Hood from Morgan Creek to a foreign company owned by Morgan Creek CEO James Robinson.

Robinson told The Hollywood Reporter at the time of Costner's suit that he and Morgan Creek executives had been "very straight" with Costner over the years, adding that the actor had been paid over $40 million (£23.5 million) for his work on the film.

Costner lost a fraudulent concealment claim that would have entitled him to punitive damages, and he also failed at a conversation claim.

A trial was scheduled to begin on 18 August (14), but lawyers representing the two parties told the judge on Friday (08Aug14) that the case has been settled. An attorney for Morgan Creek has confirmed the settlement to The Hollywood Reporter, although details have not been revealed.