A man who unleashed a vicious attack on his former partner has been told he faces jail if he doesn't comply with a court's instructions.

Steven Law avoided jail time for the assault on his ex at Craig Tara Holiday Park.

The 37-year-old appeared in the dock at Ayr Sheriff Court for sentencing after pleading guilty to the attack on his former partner on May 23 of this year.

The court heard the offence began at the activity complex in the park.

The procurator fiscal depute said that as Law and his ex were preparing to leave the complex, he told her she was an "embarrassment to him".

They then returned to their caravan where Law was seen by another witness pushing his victim to the ground, and that she landed against a child before hitting the ground.

The witness saw Law on top of his victim, punching her to the face.

She suffered a cut to her lip as a result, but did not require treatment.

The court heard that one of the victim's children ran over to Law and pulled at him, and that although Law initially resisted he did eventually get off.

The victim did not provide a statement on the attack at this time.

Defence solicitor Ian Gillies said his client "fully accepts" his actions and that he couldn't give any reason for why he behaved in this way.

He added that Law had had "far too much to drink", but now realised how serious this matter was - and how frightening it must have been for the children.

Law, of Earl Street, Glasgow, was told that if he had had any previous convictions for domestic violence he would have been sent to prison.

Instead he was put under social work supervision for 12 months as part of a community payback order and told to complete 100 hours of unpaid work over the same period.

A review of his progress will be held later this year; Law was told prison is the only alternative if he fails to comply.