(CNN) — Jarrod Ramos, the man accused of killing five employees at the Capital Gazette newspaper last year, has admitted guilt in a Maryland court, according to the newspaper and the Washington Post.

Ramos made the admission in Anne Arundel County Circuit Court, days before his trial was set to begin, according to the Capital Gazette and the Washington Post. Anne Arundel County Circuit Court Judge Laura Ripken accepted Ramos’ plea, according to the Post.

Ramos pleaded guilty to 23 counts, the Post reported. He was indicted on first-degree murder, first-degree attempted murder and assault and weapons charges after the shooting in June 2018.

CNN has reached out to Ramos’ attorney and the Anne Arundel County district attorney.

Ramos allegedly stormed the Capital Gazette’s offices, killing Gerald Fischman, Rob Hiaasen, John McNamara, Rebecca Smith and Wendi Winters.

It was the single deadliest day for journalists in the United States since 9/11.

The attack took place a few years after Ramos had unsuccessfully sued the newspaper for defamation. An article in the paper had chronicled Ramos’ harassment of a former classmate on social media. Ramos pleaded guilty to a harassment charge in that case, court documents said.

The-CNN-Wire™ & © 2024 Cable News Network, Inc., a Time Warner Company. All rights reserved.

Join our Newsletter for the latest news right to your inbox