An Illinois man found out the hard way that giving a judge the middle finger while being sworn in isn't nice — and won't go unpunished.

Kane Kellett, 24, landed in jail for six months after he raised his right hand, middle finger extended, before Judge G. Martin Zopp in McHenry County Court, the Chicago Sun-Times reported Tuesday.

The Crystal Lake man was there Saturday on home-invasion charges. Since his nonverbal "outburst," he is now serving half a year for contempt of court, according to McHenry County State's Attorney Louis Bianchi.

In the original case, Kellett is accused of breaking into the house of an acquaintance and attempting to hit him over the head with a flashlight, the Sun-Times said.

Kellett was surly from the start, according to the state's attorney.

"When they brought him out of the lockup he looked very unhappy. He was looking down all the time," Bianchi said. "The judge asked him 'Sir, do you have an attorney?' and he said 'F—- no.' "

Zopp ignored that comment but after the middle-finger incident, Assistant State's Attorney Patrick Kenneally asked that the defendant be held in criminal contempt of court.

Zopp agreed, handing down the six-month sentence.

"I'm hoping that this sends a message to all those who appear before our judges here that they must show some respect for the court and the court system," Bianchi said.

For more on this story, go to MyFoxChicago.com.