A California man was sentenced to 20 years in federal prison for dozens of crimes, including a ‘swatting’ prank that resulted in a police shooting of a stranger, whose address used to belong to the intended victim.

Swatting involves falsely reporting to police that some serious and violent situation is developing at a place, where the target lives. The police are expected to respond with an armed SWAT team rushing in and manhandling everyone they find inside. The swatting case that happened in Wichita, Kansas in December 2017 ended with a police officer shooting and killing the resident of the house, who heard the police surrounding his home and went to check out what was going on.

Update: An L.A. man accused of multiple hoax 911 calls, including one leading to police fatally shooting an innocent man in Kansas, has been sentenced to 20 years in prison https://t.co/FzziIVhPuS — KTLA (@KTLA) March 29, 2019

Tyler Barriss, 26, pleaded guilty in November to 51 charges, three of which relate to what happened in Wichita. Most of the offenses happened in California while two were for his actions in Washington, DC. The crimes ranged from making false reports and death threats to wire fraud.

On Friday, a court in Kansas sentenced him to 20 years in federal prison. Authorities in the three states agreed to drop their own charges against Barriss, saying the sentence he will get under federal law would be harsher anyway.

Also on rt.com WATCH: SWAT team & survivors rescue California mass shooting victims

The chain of events that led to the death in Wichita started as a feud between two gamers over a $1.50 bet in the game ‘Call of Duty: WWII’. Their online argument quickly escalated into threats, leading to one of them asking Barriss to pull the prank on his foe. However the address he gave belonged to a completely different family, who moved in a year earlier, after the family of the intended victim, Casey Viner, was evicted.

The police, who were responding to the false report of domestic violence, fatal shooting and hostage-taking, killed Andrew Finch, 28. A round fired from across the street pierced his ear after he hesitated to raise his hands on the porch, as ordered by the officers.

Also on rt.com Florida court awards $0.04 to family of man killed by cop inside his own garage

The shooter was not charged for the kill, a decision that the Finch family believe to be unjust. Their lawyer said they were “devastated” after learning about it in April last year, according to Wichita Eagle newspaper.

The incident may also have caused two deaths indirectly. Adelina Finch, the 18-year-old nice of Andrew who witnessed his death, took her life about a year later. Her 20-year-old boyfriend, who found her at their shared apartment, apparently committed suicide earlier this week.

Viner and his foe, Shane Gaskill, are currently being prosecuted for the roles they played in the swatting incident. They are accused of conspiracy to make false reports, obstruction of justice and wire fraud.