Ramos was swiftly arrested as he tried to hide under a desk Thursday afternoon at the Capital Gazette in Annapolis, police said.
Davis who was also hiding under a desk said he wondered to himself, "Are we all going to die?" when he heard the gunman reload.
Thomas Marquardt, the Capital Gazette's former publisher, said he reported Ramos's behaviour to the police.
Ramos is being charged with five counts of first degree murder in connection with the shooting. He has appeared in court, and been held without bail, pending a hearing date.
Wearing blue detention clothes, the suspect reportedly said nothing but watched the proceedings attentively.
A man with a long grudge against Maryland's capital-city newspaper was ordered held in jail Friday on five counts of first-degree murder after police said he blasted his way into the newsroom with a pump-action shotgun, killing five people in one of the deadliest attacks on journalists in us history.
"This attack shocked the conscience of our nation and filled our hearts with grief", Trump said at the outset of an event at the White House marking the passage of the Republican tax plan six months ago.
Investigators say he had a "long-standing grievance" with the newspaper. RAMOS HAD A HISTORY WITH THE COURTS2011: Ramos pleaded guilty in the criminal harassment case the Capital Gazette would then write about.
The victims were Wendi Winters, 65, editor and community reporter; Rebecca Smith, 34, sales assistant; Robert Hiaasen, 59, assistant editor and columnist; Gerald Fischman, 61, editorial writer; and John McNamara, 56, reporter and editor.
"We brought to the judge's attention the evidence that suggested a co-ordinated attack", Mr Adams said.
He said he had barricaded a back door and "used a tactical approach in hunting down and shooting the innocent victims".
The prosecutor said there were two entrances to the office and that Ramos entered through the front door and "worked his way through the office".
Mr Altomare said only those convicted of serious crimes and certain misdemeanours were banned from buying guns in Maryland. Police looked into the online threats in 2013, but the paper declined at the time to press charges for fear of inflaming the situation, Atltomare said.
Police identified the suspect as Jarrod Ramos, 38, from Laurel, about 25 miles (40 km) west of Annapolis.
Civil liberties groups have argued such programs invade the right to privacy, and some put the technology the same category as cellphone tracking and aerial surveillance.