A 33-year-old cleaner who punched his former girlfriend while they were in a courthouse had his jail term increased from four weeks to two months, after an appeal by the prosecution for a harsher sentence.

The 31-year-old woman had taken him to court for defaulting on maintenance payments for their daughter, amounting to about $7,790.

"The sanctity of the courthouse has to be protected. People may be under stress or emotional turmoil, and I do not doubt there may be anger, but there cannot be any tolerance of any offering or actual commission of violence," said Justice Aedit Abdullah yesterday.

The High Court judge said court users must rest assured that they will be protected from violence and harm. Those who commit such offences must be punished for their conduct and to deter others from contemplating such actions, he added.

The attack took place at the Family Justice Courts on March 31 last year, when the man and the victim appeared before a district judge after she applied to enforce a maintenance order made in 2014. The parties cannot be named to protect the identity of the child.

During a break in the hearing, while they were waiting outside the courtroom, the man and his current wife verbally lashed out at the victim.

The sanctity of the courthouse has to be protected... there cannot be any tolerance of any offering or actual commission of violence. Justice Aedit Abdullah

A security officer arrived at the scene after the victim sought help from a member of the court staff. Despite being told by the officer to keep quiet, the man and his wife continued to insult her.

The man spat at the victim three times, took off his slipper and gestured aggressively at her. His wife went towards the victim and started scuffling with her.

When the security officer tried to break it up, the man punched the victim on the nose. The couple laughed when they saw her bleeding profusely, the court heard.

The parties then returned to the courtroom and the man was ordered to pay the outstanding arrears as well as $200 a month for the child's maintenance.

For the attack, the man was charged with one count each of causing hurt and using criminal force. He was sentenced to four weeks' jail.