CNN  — 

Before he stormed into the Capital Gazette newsroom in Maryland and killed five people, suspected gunman Jarrod W. Ramos first barricaded the paper’s back entrance, authorities say.

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.

He was going up and down the newsroom, continually shooting people, police reporter Phil Davis 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.

“We are heartbroken, devastated. Our colleagues and friends are gone. No matter how deep our loss is nothing compared to the grief our friends’ families are feeling,” Capital editor Rick Hutzell said in the front-page story.

The gunman fired through the newsroom’s glass door, Phil Davis, a Capital Gazette police reporter, tweeted shortly after the shooting. “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.

The newspaper, which was reeling from the attack, defiantly tweeted on Thursday: “Yes, we’re putting out a damn paper tomorrow.”

Several staffers and reporters from its sister paper The Baltimore Sun worked on stories for Friday’s paper.

The opinion page in Friday’s paper was left mostly blank with a brief message: “Today, we are speechless. This page is intentionally left blank today to commemorate victims of Thursday’s shootings at our office.” It listed the five victims’ names.

It listed the five victims’ names.

“Tomorrow this page will return to its steady purpose of offering our readers informed opinion about the world around them, that they might be better citizens.”

History of hostility against the paper

Suspect Jarrod Ramos sued the paper for defamation in 2012.

Ramos used a 12-gauge pump-action shotgun – which he legally bought about a year ago – to shoot and kill his victims, said Altomare, the county police chief. Police also have said Ramos had smoke grenades.

Police said they haven’t determined a motive, noting the suspect hasn’t cooperated with investigators. But they have said Ramos made threats against the paper a few years ago on social media and noted that he sued the publication six years ago.

“This was a targeted attack,” Altomare said Friday.

For years, the suspect had expressed his hostility against the paper in a lawsuit and in social media.

Titled “Jarrod wants to be your friend,” the story was written by staff writer Eric Hartley and detailed the case where Ramos repeatedly contacted a former high school classmate via Facebook, according to court documents.

The case was eventually dismissed.

Brennan McCarthy, an attorney for the woman in the harassment case, said Ramos took information she shared with him in confidence “and used it to destroy her life.”

Ramos sent a letter to the woman’s employer, saying she was a bipolar drunkard, which led to her firing, the attorney said.

“This was malevolence. He had an issue with this woman. I don’t know what it was but he did everything he could to destroy her life,” “McCarthy said.

“He had an issue with this woman. I don’t know what it was but he did everything he could to destroy her life,” he said.

Ramos posted veiled threats on social media and also turned his attention to McCarthy.

“This is a man that actually stalked the attorney for the stalking victim,” McCarthy said

A Twitter account with Ramos’ name and the handle @EricHartleyFrnd is believed to belong to Ramos, a law enforcement source said. It tweeted several times about the paper and Hartley.

The account had tweeted several times about the paper and Hartley. By Friday morning, the account was suspended.

Years of threatening online comments

Altomare said his department investigated threatening online comments that Ramos allegedly made against the paper in 2013.

That same year, in a call between a detective and the paper’s legal team, the Capital Gazette decided not to pursue charges over fears it would exacerbate the situation, Altomare said.

An Anne Arundel officer wrote that during that call, he indicated that he did not believe Ramos was a threat to the paper’s employees.

The officer said the interactions between the suspect and the paper were only on Twitter and civil court filings.

The threatening tweets and rants included “mention of blood in the water, journalist hell, hit man (and) open season,” the officer wrote.

The officer describes the comments as “fringe” and “ranting,” the report said.

Tom Marquardt, the Capital Gazette’s former editor and publisher, told CNN on Friday he was disappointed charges were not filed.

“All I saw was a threat against my life and a threat against people who were working for me,” Marquardt said. “They felt however, in their professional opinion, that the evidence wasn’t there.”

Marquardt said the paper’s staff at the time got a photo of Ramos with instructions that if anybody who resembled him came through the door, they should call security and 911.

He added: “Also we had a given a photo to the front desk, with my personal instruction, that if anybody that resembled him would come through the door that they were to call 911 and our own security.”

The Capital Gazette had been threatened on social media with violence as recently as Thursday, police have said, without detailing who was behind those threats.

Ramos gave no specific warning he was going to attack the newspaper, authorities said.

Suspect fired from his job

In 2014, Ramos was fired from his job as a help desk specialist in the Bureau of Labor Statistics in Washington, according to court documents.

Ramos sued, saying they still owed him money, and wrote in a letter that he was not notified of any misconduct and got no explanation for his firing.

His employer said the federal government demanded he be terminated “citing security suitability concerns resulting from an investigation.” The company said it was unaware of the nature of the investigation.

The company said it was “never informed of the exact nature of the investigation.”

An email from bureau employee informed her co-workers then that Ramos would not be allowed on the premises “in order to mitigate potential security risk.”

Neither Enterprise Information Services nor the bureau immediately responded to a request for comment on the nature of Ramos’ termination.

Identified through facial recognition technology

Surveillance recordings from inside the building Thursday show Ramos and the shootings, police said in a probable cause affidavit.

Altomare said police identified Ramos through facial recognition technology, using stored images – perhaps such as driver’s license photos – from the Maryland Image Repository System.

Police did so after they had difficulty identifying Ramos through fingerprints, Altomare said.

Altomare said that earlier reports about Ramos’ fingerprints having been mutilated or altered were incorrect. CNN previously reported from two law enforcement sources that the suspect’s fingerprints appeared to have been altered.

Investigators said they have found evidence at Ramos’ Laurel apartment, about a 30-minute drive from Annapolis.

Altomare didn’t detail the discoveries, other than saying the findings show “what we knew we would find, which is we have one bad guy.”

A newsroom and a community mourn

Journalists at the newspaper tweeted tributes and memories of their colleagues.

“The Capital is not a big newsroom. There are about 20 news staffers, a few more advertising. We are close. We are family. I am devastated,” reporter Danielle Ohl tweeted.

In a Facebook post, best-selling author and Miami Herald columnist Carl Hiaasen said he was “devastated and heartsick” to confirm the death of his brother, Rob Hiaasen, affectionately known as “Big Rob” because he towered over people.

“He spent his whole gifted career as a journalist, and he believed profoundly in the craft and mission of serving the public’s right to know the news,” Carl Hiaasen wrote.

Clarification: This story has been updated to reflect new reporting from police regarding the suspect’s fingerprints.

CNN’s Brian Todd, Hollie Silverman, Janet DiGiacomo, Joe Sutton, Darran Simon, Sophie Tatum, Shimon Prokupecz, Carma Hassan, Evan Perez, Josh Campbell, Rene Marsh, Brian Stelter, Dave Alsup, Curt Devine and Jessie Campisi contributed to this report.