After punching his partner in front of their children, a Dunedin man went into damage-control mode.
But his hasty attempt at covering up his crime made the damage a whole lot worse.
Jason Wilson Chapman, 32, asked two friends to give police a false alibi but one of them folded and he found himself also saddled with a charge of perverting the course of justice.
In March, the defendant was sentenced to 12 months' intensive supervision for breaching a previous sentence.
The conditions barred him from contacting his ex-partner.
But days later he was at her South Dunedin home.
They argued and Chapman called the victim a "bad mother".
When she took their daughter to the toilet, the defendant followed and punched her in the back of the head.
Chapman later paced around the lounge yelling and said he did not care the children had seen his outburst.
The next day, though, when police became involved, he began to worry.
While with officers, Chapman sent a text message to Jessie De Jong telling him he needed an alibi for the previous night.
"Cover for me," he texted.
And he did.
De Jong met police the same day and told them Chapman had spent the entire evening in question with him and Anita Tovell-Soundy, covering the time of the alleged assault.
On April 12, he backed that up with a written statement and Tovell-Soundy followed suit, saying their friend never left the house.
But further police inquiries untangled the lie.
When officers quizzed Tovell-Soundy again, she admitted being part of the cover-up and explained she "felt pressured to provide the statement".
Chapman appeared in the Dunedin District Court yesterday after admitting his role in the ruse and the violence that preceded it.
Judge Kevin Phillips sentenced him to seven months' home detention and 150 hours' community work.
It was only by a "fine margin" Chapman missed out on a prison term, he said.
De Jong and Tovell-Soundy also pleaded guilty to their respective roles and are awaiting sentencing.