A father-of-three repeatedly licked a female garda and told her he "wanted to f**k an Irish woman".
Denis Kaczor Niecko (28) kicked out and tried to headbutt the officer's two male colleagues as he was being taken to a garda station.
The officers struggled to restrain Niecko, who was laughing as he repeatedly spat at them.
Gda Niamh Logan, an officer with 12 years' service, said the case was the "most distressing" she had ever dealt with.
Imposing a 12-month sentence, Judge Dermot Dempsey said that if it was within his remit he would have Niecko removed from the country.
The defendant, of Westbrook Lawn, Balbriggan, admitted before Swords District Court to charges of assault and criminal damage last April 3.
Gda Logan said she was on patrol when she received a description of a man who had allegedly carried out a theft at Castlemill Shopping Centre.
She said she stopped Niecko, who fitted the description, and asked for his details.
He was aggressive towards her, shouting and waving his arms.
Gda Logan said Niecko was handcuffed and placed in the patrol car beside Gda Barry O'Hare.
Gda Logan said Niecko became violent, so she opened the back door of the car to help Gda O'Hare. Niecko licked her and told her he "wanted to f**k an Irish woman".
The court heard Niecko repeatedly tried to kick and headbutt Gda Logan, and was continually vulgar.
Gda Logan said Niecko spat at her and licked her hand a number of times.
She said he violently kicked out at Gda O'Hare's legs and spat at him in the face.
Gda Logan said the patrol car had to be professionally cleaned and her and Gda O'Hare's uniforms had to be destroyed due to contamination.
Defence lawyer Patrick Jackson said Niecko, a catering assistant, had "blacked out" and did not remember what had happened.