Mel Gibson has been ordered to pay £462,000 ($750,000) to his ex-girlfriend to settle a long-running bitter custody dispute.

He must also continue to provide housing and financial support for their young daughter.

The settlement is intended to end the bickering and accusations that have permeated the case handled in mostly secret proceedings for more than a year, a California court said.

The Oscar-winning director’s payments to Russian musician Oksana Grigorieva are dependent on a lasting truce.

As part of the agreement, their daughter will receive support equal to what the actor-director provides for his other seven children.

The pair will split custody of the girl, who turns two next month.

In addition, Gibson will keep paying for a multi-million-dollar house he purchased for Grigorieva and their daughter.

The house will be sold when the girl turns 18 and she will receive the proceeds.

Video: Associated Press

As a result of the settlement, Grigorieva cannot pursue a civil case against the Oscar winner, and both sides were ordered not to speak or write about their relationship or allegations of domestic abuse.

The judge specifically said neither side could release any audio recordings, an apparent reference to the series of rants that were leaked to the celebrity website