Mel Gibson has pleaded no contest to a misdemeanor spousal battery charge hours after it was filed.

gibson-mel-reuters-rtr2fzuk

Actor and filmmaker Mel Gibson has pleaded no contest in Los Angeles to a charge of spousal battery.

The Academy Award winner appeared in a Los Angeles courtroom Friday and entered the plea to end the case before it goes to trial. He was placed on probation and ordered to enroll in a domestic violence counseling program.

He is accused of striking then-girlfriend Oksana Grigorieva during a fight in January 2010.

The Russian musician did not attend the hearing but was represented by one of her attorneys.

The actor-director arrived in court accompanied by his attorney, Blair Berk, who has said Gibson sought to end the case after considering the case's impact on his children, including his youngest — an infant daughter with Grigorieva.    Earlier Friday, Los Angeles prosecutors charged the Academy Award-winner in the incident. Gibson is not expected to serve any jail time.

In 2010, recordings of Gibson using a racial epithet and calling Grigorieva a "whore" were posted online by a celebrity website. The widely heard recordings and a subsequent domestic-violence investigation turned Gibson into somewhat of a Hollywood outcast.