A California man was sentenced to 20 years in prison on Friday for phoning a false hostage threat to police in Wichita, resulting in the death of an innocent man.

Tyler Rai Barriss, 26, of Los Angeles, pleaded guilty in November to 51 charges filed by prosecutors in Los Angeles, Kansas and Washington, D.C., according to the U.S. attorney’s office in the Central District of California.

Prosecutors say police responded to the home of 28-year-old Andrew Finch on Dec. 28, 2017, after a caller falsely claimed to be inside with hostages and a gun — a style of prank known as “swatting.” Finch, unaware of the false report, answered the door and was fatally shot on his porch by officers who had surrounded his home.

That call was later determined to have originated from Barriss, who was arrested several hours later in connection with Finch’s death. He told authorities he had made the call at the request of Casey Viner, 19, who had gotten into a feud with Shane Gaskill, 20, while the two were playing “Call of Duty” online.

According to prosecutors, Viner, of Ohio, contacted Barriss and asked him to “swat” Gaskill, who lived in Wichita. But when Gaskill learned he was being targeted, he dared Barriss to “swat” him and tricked the man into calling authorities to a two-story house on McCormick Street — an old address where Gaskill no longer lived, prosecutors say.

Barriss reportedly called Wichita City Hall and ended up speaking with a 911 dispatcher. He claimed he had accidentally shot his father in the head during an argument and was now pointing a handgun at his mother and brother at the address on McCormick Street, which now belonged to Finch.

Finch, who was at home with his mother and at least two other people when police arrived, was shot dead when an officer thought he saw him reach for a weapon. Police soon learned Finch was not carrying a weapon and there were no hostages in the house.

“I had seen the red and blue light flashing in my window,” Finch’s mother, Lisa Finch, told the Wichita Eagle at the time. “I heard my son scream, I got up and then I heard a shot. … They didn’t call the ambulance until he was dead.”

At a news conference following Finch’s death, police said the officer who fired his gun had been placed on paid leave. The deputy police chief blamed Finch’s death on “the actions of a prankster.”

Gaskill and Viner are awaiting trial, according to prosecutors, who wrote in a news release Friday that “swatting is no prank.” The practice usually makes the news when police are tricked into raiding the home of a celebrity — such as Justin Bieber in 2012 or Lil Wayne in 2015. But it has also become a way for people to escalate online disputes into the real world — punishing a rival with a surprise visit from a SWAT team.

“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,” Stephen McAllister, U.S. attorney for Kansas, said in the news release. “I hope that this prosecution and lengthy sentence sends a strong message that will put an end to the juvenile and reckless practice of ‘swatting’ within the gaming community, as well as in any other context.”

In the Wichita case, Barriss was charged with one count of making a false report resulting in a death, one count of cyberstalking and one count of conspiracy. He was also charged in Washington, D.C., and California, where prosecutors say he was also the mastermind behind “dozens” of other swatting incidents and false reports that didn’t result in injuries. His 20-year sentence is believed to be the longest sentence imposed for “swatting” or hoaxes, according to the U.S. attorney’s office.

Read more:

An activist used a legal argument to stop an ICE arrest. He says others should do the same.

Chick-fil-A was banned from San Antonio’s airport. The Texas attorney general says it’s ‘discriminatory.’