Actor Mel Gibson (R) and Oksana Grigorieva pose during the Spanish premiere of the film ''Edge of Darkness'' in Madrid
Actor Mel Gibson (R) and Oksana Grigorieva pose during the Spanish premiere of the film ''Edge of Darkness'' in Madrid February 1, 2010. Reuters

Mel Gibson and his ex-girlfriend on Friday settled a deeply bitter custody dispute over their young daughter which led to the Oscar winner's plea of no contest to domestic violence earlier this year.

Los Angeles Superior Court said in a statement an agreement was complete and terms will be heard on August 31. A spokesman for the Braveheart film director confirmed the parties had settled.

We appreciate all the judge's help, the spokesman said in a statement.

It was not immediately clear whether the custody deal between Gibson and Oksana Grigorieva over their daughter Lucia settled all of the legal problems between the two. Gibson's spokesman declined further comment.

Gibson and Grigorieva had a long-running relationship that involved the breakup of his marriage and the birth of their daughter but it began to unravel in early 2010. Grigorieva claimed Gibson punched her and broke her tooth during a heated argument in January that year.

In March, the Passion of the Christ director admitted in front of a judge that he slapped Grigorieva with an open hand during an argument in which he was concerned for the safety of Lucia. He pleaded no contest -- the equivalent of guilty -- and was sentenced to three years probation.

Gibson has alleged Grigorieva tried to extort money from him beyond a reported $20 million settlement that resulted from their breakup by using a series of audiotapes of insults and a racial slurs hurled at her over the telephone. Prosecutors declined to charge her in the matter.

The tapes, posted last year on celebrity website Radaronline.com, damaged Gibson's career. His manager left, a movie's release was delayed and others refused to work with him.

Roughly one month later, Gibson said in a television interview he regarded the leak of the phone calls to the media as a personal betrayal.