In this June 28, 2018 file photo, Maryland police officers patrol the area after multiple people were shot at at The Capital Gazette newspaper in Annapolis, Md. A grand jury has leveled 23 charges against a man accused of killing five people in a mass shooting at a Maryland newsroom. In a news release Friday, July 20, Anne Arundel County State's Attorney Wes Adams announced the indictments against Jarrod Ramos in the June 28 attack at the Capital-Gazette office in Annapolis. Credit: Jose Luis Magana | AP

The man accused of killing five in a shooting at the Capital Gazette’s newsroom has been indicted on 23 counts charging him with murder, attempted murder, assault and weapons offenses.

Jarrod Ramos, 38, was found hiding under a desk June 28 after he blasted through the newsroom’s glass doors and fired at newspaper employees in a targeted attack, police said.

Ramos had a long-running vendetta against the paper after he lost a defamation case involving a column it published about his pleading guilty to harassing a former high school classmate over social media.

The rampage in an office building just outside of Maryland’s capital of Annapolis left five dead: editorial editor Gerald Fischman, 61; assistant editor Rob Hiaasen, 59; sportswriter and editor John McNamara, 56; sales assistant Rebecca Smith, 34 and reporter Wendi Winters, 65.

The indictment, announced Friday by the Anne Arundel County State’s Attorney’s Office, also accused Ramos of attacking six other reporters and employees: Paul Gillespie, Selene San-Felice, Phillip Davis, Janel Cooley, Anthony Messenger and Rachael Pacella.

The shooting is one of the nation’s deadliest attacks involving journalists in decades and prompted newsrooms nationwide to heighten security.

Davis, a public safety reporter, sent tweets about the shooting after police apprehended Ramos, of Laurel.

“There is nothing more terrifying than hearing multiple people get shot while you’re under your desk and then hear the gunman reload,” Davis wrote.

Anne Arundel County State’s Attorney Wes Adams is expected to prosecute the case along with two assistant state’s attorneys. Ramos has been ordered held without bond pending trial.

During the bond hearing, Adams said Ramos launched a planned and coordinated attack, blocking the back exit of the office to prevent people in the newsroom from fleeing the gunfire.

Police said Ramos had threatened the newspaper in 2013 after losing his defamation case and continued to issue warnings and rants against the publication on social media.

The Office of the Public Defender in Maryland is representing Ramos and has previously declined to comment about the case.

Letters that police said appeared to have been mailed on the day of the shootings from Ramos to several people or courthouses involved in his previous defamation case arrived after his arrest.

The community newspaper, which had a newsroom staff of 31 before the attack, published the day after the attack and since then has seen journalists from across the country line up to help.

Follow the Bangor Daily News on Facebook for the latest Maine news.