The court heard Marium Varinauskas had been drinking heavily.
A man who assaulted a female police officer with his penis has been fined.
Marium Varinauskas, 28, tried to strike the officer on the head with his penis when she was called out to his flat, but she got out of the way.
Lithuanian Varinauskas admitted a charge of assault at Aberdeen Sheriff Court and was fined £600.
The court heard he had been drinking heavily and could not remember committing the offence at his home in Aberdeen.
Police were called to his home by his girlfriend, who had complained about him being drunk last November.
They arrived to find the self-employed engineer sitting on the sofa wearing a pair of underpants.
He apologises profusely and is extremely embarrassed
Fiscal depute Elaine Lynch said: "The accused got to his feet and was standing over the police officer exposing his penis and thrusting it in her face, forcing her to take evasive action to avoid getting struck."
Defence solicitor John Hardie said: "He was sitting on the couch drunk with his pants on.
"He can't remember anything but accepts that if that's what the police say then that's what happened.
"He has never been so drunk before that day and accepts he has to take full responsibility. He apologises profusely and is extremely embarrassed."
His not guilty plea to committing a breach of the peace by uttering offensive and sexual remarks was accepted by the Crown.
Sheriff Annella Cowan was told that the Lithuanian had now quit binge drinking because of the incident.
-------------------- "Being deeply learned and skilled, being well trained and using well spoken words; this is good luck."