Updated at 12:11 a.m. on Friday, June 29, 2018 with information about the victims.

Photo Gallery Capital Gazette shooting View 35 Photos

A single shooter shot multiple people at my office, some of whom are dead. — Phil Davis (@PhilDavis_CG) June 28, 2018

ANNAPOLIS, Md. (AP) — A man armed with smoke grenades and a shotgun attacked a newspaper in Maryland's capital Thursday, killing four journalists and a staffer before police quickly stormed the building and arrested him, police and witnesses said.

The shooting came amid months of verbal and online attacks on the "fake news media" from politicians and others from President Donald Trump on down. It prompted New York City police to immediately tighten security at news organizations in the nation's media capital.

Gunman shot through the glass door to the office and opened fire on multiple employees. Can't say much more and don't want to declare anyone dead, but it's bad. — Phil Davis (@PhilDavis_CG) June 28, 2018

Police in Annapolis said a white man in his late 30s was in custody after the rampage at The Capital Gazette. A law enforcement official said the suspect was identified as Jarrod W. Ramos. The official wasn't authorized to discuss the ongoing investigation and spoke on condition of anonymity.

There is nothing more terrifying than hearing multiple people get shot while you're under your desk and then hear the gunman reload — Phil Davis (@PhilDavis_CG) June 28, 2018

Acting Police Chief William Krampf of Anne Arundel County called it a targeted attack in which the gunman "looked for his victims."

"This person was prepared today to come in, this person was prepared to shoot people," Krampf said.

The dead included Rob Hiaasen, 59, assistant managing editor and brother of novelist Carl Hiaasen. Carl Hiaasen said he was "devastated and heartsick" at losing his brother, "one of the most gentle and funny people I've ever known." Also slain were Gerald Fischman, editorial page editor; features reporter Wendi Winters; reporter John McNamara, and sales assistant Rebecca Smith. Police said two others had minor injuries, and the newspaper later reported both were employees later released from a hospital with non-life-threatening injuries.

Krampf said the gunman was a Maryland resident, but didn't name him.

Phil Davis, a reporter who covers courts and crime for the paper, tweeted that the gunman shot out the glass door to the office and fired into the newsroom, sending people scrambling under desks.

"There is nothing more terrifying than hearing multiple people get shot while you're under your desk and then hear the gunman reload," he wrote.

At the White House, spokeswoman Lindsay Walters said: "There is no room for violence, and we stick by that. Violence is never tolerated in any form, no matter whom it is against."

Meanwhile, investigators said they would seek to learn more of the gunman's motives.

"The shooter has not been very forthcoming, so we don't have any information yet on motive," Anne Arundel County Executive Steve Schuh said.

In 2012, Ramos filed a defamation lawsuit against the paper, alleging he was harmed by an article about his conviction in a criminal harassment case a year earlier. The suit was dismissed by a judge who wrote Ramos hadn't shown "anything that was published about you is, in fact, false." An appeals court later upheld the dismissal.

In an interview appearing on The Capital Gazette's online site, Davis said it "was like a war zone" inside the newspaper's offices.

"I'm a police reporter. I write about this stuff — not necessarily to this extent, but shootings and death — all the time," he said. "But as much as I'm going to try to articulate how traumatizing it is to be hiding under your desk, you don't know until you're there and you feel helpless."

Reporter Selene San Felice told CNN she ran after hearing shots but found a back door locked, then watched as a colleague was shot.

"I heard footsteps a couple of times ... I was breathing really loud and was trying not to, but I couldn't be quiet," she added.

The reporter recalled a June 2016 mass shooting attack on Orlando's gay nightclub Pulse and how terrified people crouching inside had texted loved ones as dozens were killed. She added: "And there I was sitting under a desk, texting my parents and telling them I loved them."

Police spokesman Lt. Ryan Frashure said officers arrived within about 60 seconds and took the gunman into custody without an exchange of gunfire. About 170 people were evacuated, many leaving with their hands up as police and other emergency vehicles arrived.

Annapolis Mayor Gavin Buckley said the community was grieving the attack on its paper.

"These are the guys that come to city council meetings, have to listen to boring politicians and sit there," Buckley said. "They don't make a lot of money. It's just immoral that their lives should be in danger."

The newspaper is part of Capital Gazette Communications, which also publishes the Maryland Gazette and CapitalGazette.com. It is owned by The Baltimore Sun.

The Associated Press Media Editors have promised to help Capital Gazette journalists as they recover. An APME statement called on newspapers nationwide to help the paper and its journalists so they can continue to cover their community and fight for freedom of the press.

The attacker had mutilated his fingers in an apparent attempt to make it harder to identify him, according to a law enforcement official who was not authorized to discuss the investigation and spoke on condition of anonymity. Another official speaking on condition of anonymity said he was identified with help of facial recognition technology. Of the two accounts, Krampf said: "We have no verification of either."