MILWAUKEE (AP) — A Milwaukee man convicted for pointing a gun at a mail carrier who had earlier pepper-sprayed his pit bull has been sentenced to three years in federal prison.

A jury in November found David Polnitz Jr. guilty of two charges, including illegally possessing a firearm as a convicted felon.

Prosecutors say the postal worker was attempting to deliver mail when he was charged by Polnitz’s unrestrained pit bull. The letter carrier said he used the pepper spray because he feared for his life.

Polnitz admitted that he argued with the mail carrier but denied that he confronted him with a gun or threatened to kill him.

U.S. District Judge Pamela Pepper called it one of the more serious cases of its kind that she had seen and said the victim was merely doing his job.