Mel Gibson has at last settled the rancorous custody and financial battle with his ex-girlfriend and the mother of his child, reports People. After over a year of back-and-forth, Gibson agreed Wednesday to pay Oksana Grigorieva $750,000 over the next five years. The money will go toward care and education for Lucia, the former couple’s daughter, who will turn 2 in October. Under the deal, the actor and his ex will split custody equally as Grigorieva and Lucia continue to live in one of Gibson’s homes in Los Angeles. When Lucia turns 18, Gibson will sell the house and put the proceeds in a trust for her. The settlement, which also put to rest a civil suit Grigorieva threatened against Gibson, prohibits both Gibson and Grigorieva from speaking about each other or their relationship publicly. Gibson told Los Angeles Superior Court Judge Peter D. Lichtman, “Thanks, your honor, for bringing this case to a reasonable conclusion.”

Read more: