Federal prosecutors in Kansas announced Tuesday that a 26-year-old Californian has admitted that he caused a Wichita man to be killed at the hands of local police during a swatting attack late last year.

Swatting is a way to harass or threaten someone by calling in a false threat to law enforcement, and, when successful, it usually results in a police SWAT team showing up needlessly at its victim's house.

According to the United States Attorney's Office for the District of Kansas, Tyler Barriss pleaded guilty to making a false report resulting in a death, cyberstalking, and conspiracy. He also admitted that he was part of "dozens of similar crimes in which no one was injured."

In May 2018, Barriss was indicted on county charges (manslaughter) and federal charges, which include cyberstalking and wire fraud, among many others.

US Attorney Stephen McAllister said in a Tuesday statement that Barriss would be sentenced to at least 20 years in prison.

"Without ever stepping foot in Wichita, the defendant created a chaotic situation that quickly turned from dangerous to deadly," McAllister was quoted as saying in the statement. "His reasons were trivial, and his disregard for the safety of other people was staggering."

Barriss also was involved in calling in a bomb threat to the Federal Communications Commission in December 2017 to disrupt a vote on net neutrality rules.

"I am deeply grateful to the U.S. Department of Justice, the FBI, local law enforcement, and FCC security officials for their efforts in prosecuting this case and protecting this agency," Chairman Ajit Pai said in a statement . "We will continue working to carry out the mission of the FCC."

Barriss also pleaded guilty to 46 counts in a separate case brought in federal court in Los Angeles. In that case, he had threatened bomb attacks in high schools, universities, shopping malls, and television stations.

Barriss' two co-defendants—Casey Viner, 18, and Shane Gaskill, 20—are awaiting trial.

According to Barriss' plea, which was not immediately made available, prosecutors added that he "admitted he got involved with Viner and Gaskill after they had a falling out while playing the game Call of Duty online. As a result, Viner, who was in Ohio, asked Barriss, who was in California, to swat Gaskill, who was in Wichita. Gaskill found out Barriss was stalking him and, in messages over the Internet, he dared Barriss to carry out the swat. Gaskill fooled Barriss, however, by claiming to live at 1033 W. McCormick. In fact, Gaskill no longer lived there."

The 26-year-old Californian is scheduled to be sentenced on January 30, 2019, in federal court in Wichita.

UPDATE Wednesday 12:12pm ET: Barriss' 45-page plea deal has been made public. We have published it here, along with the 16-page petition to the court to accept the plea.