(CNN) A California man who made a hoax call that precipitated a fatal police shooting in Kansas has been sentenced to 20 years in federal prison.

Tyler Raj Barriss received the sentence after pleading guilty to making a false report resulting in death and dozens of other counts related to calls in which no one was hurt.

"Swatting is no prank," said Stephen McAllister, the US Attorney for the District of Kansas. "Sending police and emergency responders rushing to anyone's home based on utterly false information as some kind of joke shows an incredible disregard for the safety of other people."

Prosecutors and defense attorneys reached a plea deal but each side recommended a different punishment. Prosecutors asked for 25 years, but the judge went with the defense request for 20 years.

McAllister told reporters it is "by far the longest prison sentence in the country ever imposed for the practice of swatting."

Read More