The man who edited Wikipedia with several senators’ private phone numbers and addresses has pleaded guilty to computer fraud and other offenses. Jackson Cosko, a former employee of Senator Maggie Hassan, was arrested last year on suspicion of doxxing five members of Congress. He’s now admitted to breaking into Hassan’s office after being fired, stealing data that included personal contact information, then posting that information online during Supreme Court Justice Brett Kavanaugh’s confirmation hearing.

Cosko worked as a computer system administrator for Hassan, but he was fired in May of 2018. According to a plea agreement, he retaliated by using a key from another employee (who was later fired) to break into his old workplace at least four times, installing keyloggers on computers and using stolen login credentials to download gigabytes of data.

Cosko was angry about losing his job — and about Brett Kavanaugh’s Senate confirmation hearing

While watching the Supreme Court confirmation hearing in September, Cosko “became angry” at Republican senators questioning Kavanaugh — so he posted contact information for Senators Lindsey Graham, Mike Lee, and Orrin Hatch on Wikipedia. Cosko was interning for US Representative Sheila Jackson Lee at the time, and his changes were flagged by a bot that detects Wikipedia edits from congressional computers. The bot inadvertently helped spread the senators’ information across Twitter, a process that prosecutors say Cosko aided by tweeting about his leaks.

Cosko struck again a few days later, posting information about Senate Majority Leader Mitch McConnell and Senator Rand Paul — who had called for an investigation — on Wikipedia. He added comments calling himself a “golden god” who had a legal right to post the information, asking readers to “send us bitcoins.”

When a witness spotted him in Hassan’s office the next day, Cosko responded with a threatening email titled “I own EVERYTHING.” Cosko claimed he would release private emails, encrypted messages, and the health data and social security numbers for senators’ children. “If you tell anyone I will leak it all,” he wrote. Cosko was arrested soon after.

Now, Cosko has admitted to charges of computer fraud, witness tampering, obstruction of justice, and making restricted personal information public. Attorneys for the District of Columbia say he could serve between 30 and 57 months in prison, and as part of his plea deal, he’s required to give up computers, cell phones, and “other equipment used in the crimes.” Sentencing will take place in June.

Senator Hassan tells The Verge that “I am grateful to Capitol Police for all that they do every day to keep us safe, and I thank Capitol Police and the US Attorney’s Office for their work to bring this individual to justice.”

Update 6:00PM ET: Added detail from Hassan’s office stating that an employee whose key Cosko used was fired.