A Dunfermline man has admitted assaulting a toddler, which left the child with bruised legs.
Several people were concerned after hearing loud smacking noises.
Greig Hamilton, 22, appeared for sentencing at Dunfermline Sheriff Court.
He had previously admitted that on November 9, at an address in Dunfermline, he assaulted a child by repeatedly striking them on the body to their injury and swearing at them.
Depute fiscal Azrah Yousaf said that neighbours became concerned after hearing “loud smacking noises” coming from a house and Hamilton shouting.
Police were called and went to the house at around 9.50pm. The child was later found to have bruising.
Hamilton initially denied the offence and said he would never hit a child.
However, he later admitted he had “skelped” the child four or five times.
Defence solicitor Ian Beatson told the court: “He regrets the incident.
“He didn’t know how to cope with a child having a tantrum. He realises what he did was wrong.”
Sheriff Craig McSherry imposed a community payback order with 160 hours of unpaid work and a 12-month supervision order.