CNN  — 

The accused gunman in the deadly shooting at Maryland’s Capital Gazette newspaper barricaded the back entrance of the paper’s office so people could not escape as he began “systematically hunting and killing,” Anne Arundel County State’s Attorney Wes Adams said Friday.

Authorities said Jarrod Warren Ramos, 38, stormed into the paper’s Annapolis newsroom Thursday afternoon with a shotgun, killing five employees and leaving two others wounded – with the shooting taking place a few years after he unsuccessfully sued the newspaper for defamation.

Ramos concealed his weapon as he entered the building’s back entrance and barricaded a back door, Adams said at Ramos’ bail hearing Friday morning in an Annapolis court. The first blasts came through the building’s front door, which sent employees rushing toward the back door.

Ramos shot at least one victim who was trying to escape through the barricaded door, Adams said.

A witness earlier told CNN that she saw one of the slain victims get shot after he tried to open a back door.

“This fellow was there to kill as many people as he could get,” Anne Arundel County police Chief Timothy Altomare said at a news conference Friday in Annapolis.

Police said that Ramos was arrested shortly after the shooting and that responding officers found him hiding under a desk. He has been charged with five counts of first-degree murder, according to court records.

A judge ordered Ramos held without bail at Friday’s hearing.

Ramos, wearing a dark shirt, appeared in court via a video feed from a nearby detention center, standing silently as Adams made the allegations against him.

Ramos had a plan to escape, but it was thwarted when police responded, Adams said.

The five slain were Gerald Fischman, 61, editorial page editor; Rob Hiaasen, 59, an assistant editor; John McNamara, 56, a staff writer; Rebecca Smith, 34, a sales assistant; and Wendi Winters, 65, who worked in special publications.

The two wounded employees, Rachel Pacella and Janet Cooley, have been treated at a hospital and released, Anne Arundel police Lt. Ryan Frashure said.

‘Never stop reporting’

At a vigil Friday in Annapolis, mourners held candles and copies of the Capital Gazette. Some held each other during the walk.

One woman carried a sign that said, “Never Stop Reporting,” and “We Need Your Voice & Stories.” At one-point, people lined both sides of one street as a musician, who stood in the middle of the street, played “Amazing Grace” on a bagpipe. Some people sang the words to the hymn.

Carol Geithner, left, and Yasemin Jamison gather for a candlelight vigil in  Annapolis, Maryland.

What we know about the Annapolis newspaper shooting

‘Yes, we’re putting out a damn paper’

Hours after the shooting, the Capital Gazette, a newsroom in mourning, published a newspaper with a front page bearing the photos of the five slain employees.