A Texas family court judge lost his seat in Tuesday’s primary election nearly three years after his daughter posted video of him beating her with a belt.

Aransas County Attorney Richard Bianchi narrowly defeated Judge William Adams in the Republican primary election, according to unofficial vote counts.

The 53-year-old Adams had not faced an opponent since he was elected in the 2002 GOP primary.

His daughter posted a video in 2011 that she had secretly recorded seven years earlier, when she was 16 years old, that showed her father whipping her with a belt as he berated and threatened her over illegally downloaded computer files.

He was suspended from the bench in 2012 after state officials ruled that the videotaped beating showed actions that were not becoming of a judge.

The State Commission on Judicial Conduct also ruled that his actions had cast doubt on his ability to be impartial, particularly in family law cases, but said he was still a good judge.

Lawyers told investigators they thought Adams was fair, even if they did not always like his courtroom demeanor.

Cases that involved allegations of physical violence against children were transferred to another court since Adams was suspended.

Bianchi will take the bench in January because no Democrats had filed to run against the winner of the GOP primary.

Watch video from the incident posted online by The Young Turks: