A New York court has ruled that parents can spank their children. The ruling came after a Long Island dad was accused of child abuse after he spanked his son for swearing at an adult.

In a unanimous decision, an appellate court found that spanking is a reasonable use of force.

Read more from New York Daily News:

In a ruling Wednesday, the state Appellate Division found that a Long Island father’s spanking of an 8-year-old boy “was a reasonable use of force.”

A Suffolk County Family Court judge had determined last year that the father of the boy had abused his son “by inflicting excessive corporal punishment.”

The father allegedly spanked the child with an open hand as punishment for cursing while they were at a party at friend’s home back in 2012, the appeals court ruling says.

“Further, it was alleged that after the father and the child returned home from the party, the father repeatedly struck the child with a belt on the buttocks, legs and arms,” the ruling said.

But while the dad, whose name was withheld, admitted spanking the boy for cursing, he denied hitting him with a belt.

The Appellate Division said there was insufficient evidence to uphold that charge, and gave him a pass on the spanking.

“The father’s open-handed spanking of the child as a form of discipline after he heard the child curse at an adult was a reasonable use of force and, under the circumstances presented here, did not constitute excessive corporal punishment,” the four-judge panel ruled in a unanimous decision.

Courts in other states have also backed up parents who spanked their kids.

More from Fox News:

Is Yelling the New Spanking?

Parents Upset Over School's Corporal Punishment Permission Form

Mom Briefly Banned From Facebook Over Picture of Daughter on Beach