The man was sentenced in Napier District Court on Friday. (File photo)

A man who indecently assaulted his mate with a marker pen has been told he could go to jail if he does anything like it again.

The man was given the warning by Judge Geoff Rea when appeared for sentencing in Napier District Court on Friday.

The 29-year-old man and two colleagues, all electricians from Hamilton, were in a motor lodge in Hastings on in December 2016. They were in Hawke's Bay for work.

After a long drinking session one of the men vomited in a bathroom and had a shower to clean up.

READ MORE:

* Napier man charged over indecent assault

After getting changed he drank more alcohol before having a play fight with the defendant.

The defendant held the man down and drew over his face with a marker pen. He then drew over his back, before pulling the victim's pants down, drawing on his buttocks and indecently assaulting him with the pen.

While this was going on the third man filmed the incident on his cellphone.

The victim was upset and went upstairs and telephoned his father, who got police involved.

The man pleaded guilty to indecent assault.

Judge Rea said "this is an unusual case to say the least".

He said the man had never appeared in court before and "despite the unsavoury nature of the facts here, with your background and age and the circumstances in which this occurred, a sentence of imprisonment, although an option, was highly unlikely".

"You must now know that this sort of conduct is taken extremely seriously," Judge Rea said.

He sentenced him to 200 hours of community work and issued him with a three strikes warning.

The judge told the man to wait in the cells while paperwork was completed, and to "have a look around because if you ever get involved with anything like this again that's where you'll be staying".