ANNAPOLIS, MD.: A gunman opened fire in a newspaper office in Maryland’s capital Thursday, killing five people and wounding others before being taken into custody, police and witnesses said.

Police said the suspect was a white man in his late 30s whose shotgun rampage at the Capital Gazette followed social media threats directed at the newspaper. A law enforcement official said the suspect has been identified as Jarrod W. Ramos. The official was not authorized to discuss the ongoing investigation by name and spoke on condition of anonymity.

Authorities said the gunman entered the building in a targeted attack and “looked for his victims.” He had smoke grenades and fired a shotgun at his victims, according to Anne Arundel County Acting Police Chief William Krampf.

“This person was prepared today to come in, this person was prepared to shoot people. His intent was to cause harm,” Krampf said.

Krampf said the gunman was a Maryland resident, and search warrants were being sought for his home.

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 for cover under desks.

“A single shooter shot multiple people at my office, some of whom are dead,” he wrote. Davis added: “There is nothing more terrifying than hearing multiple people get shot while you’re under your desk and then hear the gunman reload.”

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 who also spoke on condition of anonymity said investigators identified the man using facial recognition technology.

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

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.”

Authorities said the suspect was undergoing questioning.

“The shooter has not been very forthcoming, so we don’t have any information yet on motive,” Anne Arundel County Executive Steve Schuh said. “To my knowledge, there was no verbal aspect to the incident where he declared his motives or anything else, so at this point we just don’t know.”

Krampf confirmed five deaths and said two people had minor wounds.

Police spokesman Lt. Ryan Frashure said the gunman was taken into custody without an exchange of gunfire.

About 170 people in all were evacuated from the building as police and other emergency vehicles converged on the scene.

Author Carl Hiaasen wrote on Facebook that his brother, columnist Rob Hiaasen, 59, was among the dead and that he was “devastated and heartsick.”

In an interview with the Capital Gazette’s online site, Davis said it “was like a war zone” inside the newspaper’s offices — a situation that would be “hard to describe for a while.”

“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.”