Los Angeles (CNN) -- Actor Mel Gibson entered a "no contest" plea Friday afternoon to a misdemeanor battery charge relating to an incident a year ago involving his former girlfriend.
Los Angeles County Judge Stephanie Sautner accepted a plea deal that puts the actor on unsupervised probation for three years and requires Gibson to complete 52 weeks of anger management counseling.
"No contest, pursuant to People v. West," Gibson said, when Judge Sautner asked for his plea.
The "West plea" allows a defendant to enter a no contest plea without admitting guilt.
Los Angeles County Deputy District Attorney Simone Shay told the court the prosecution accepted the plea deal "to lessen the trauma and impact of any court proceedings on the victim and minor witness."
Defense lawyer Blair Berk said Gibson agreed to the plea "because it's in the best interest of his children."
A trial on the charge would likely have required Oksana Grigorieva and her minor son to testify as witnesses to the January 6, 2010 incident.
Grigorieva was not in the courtroom, but her lawyer gave CNN a written statement that indicated she was satisfied with the resolution.
"Ms. Grigorieva will now concentrate on co-parenting Lucia, resuming her charitable work for the children of Chernobyl and moving forward with her life," the statement said.
Gibson must also complete 16 hours of community service with "Mending Kids," a charity, Judge Sautner said.
The sentence also included a $400 domestic violence fine and $180 in other fees, the judge said.
Judge Saunter also imposed a restraining order on Gibson, but it still allows him to have contact with Grigorieva, the mother of his young daughter, Lucia.
"Mel's only priority throughout all of this has been that the best interests of his young daughter Lucia and the rest of his children be put first in any decisions made," Berk said in a statement earlier in the week.
Prosecutors considered evidence gathered by sheriff's investigators to decide if a domestic violence case would be filed against Gibson because of the incident a year ago involving Grigorieva.
Detectives also investigated Gibson's charge that Grigorieva, a Russian musician, tried to extort money from him with recordings she made of his telephone calls, a Los Angeles County sheriff's spokesman said.
No charges were filed against her.
Gibson and Grigorieva are in a bitter legal fight over custody of their daughter. The sheriff's investigation findings have been in the hands of prosecutors since August.
CNN's Michael Martinez and Brittany Kaplan contributed to this report.