Five people were killed and two others injured in a “targeted attack” on the Capital Gazette, a daily newspaper based in Annapolis, Maryland, authorities said Thursday evening.

The suspected gunman, who was identified by NBC News as 38-year-old Jarrod Ramos, was taken into custody outside of the Gazette offices. He allegedly entered the newspaper’s building around 3 p.m. ET with a shotgun, threw smoke grenades, and “looked for his victims as he walked through the lower level,” police said at a press conference.

“This person was prepared to shoot people. His intent was to cause harm,” Anne Arundel County Acting Police Chief Bill Krampf said.

Before the attack, threats had been sent to the Gazette over social media that “indicated violence,” authorities added.

“We have no knowledge at all that he was targeting anyone specific at the capital,” Krampf said.

A U.S. official told the Associated Press that the shooter refused to cooperate with investigators, and even “damaged his fingerprints” so that he could avoid being identified quickly by law enforcement. But, according to the outlet, investigators identified him using “facial recognition technology.”

Several Gazette staffers tweeted about the shooting, including intern Anthony Messenger, who fired off a desperate message at 2:43 p.m.: “Active shooter 888 Bestgate please help us.” Gazette reporter Phil Davis tweeted shortly after the attack that “a single shooter” fired on multiple people in his office, firing through a glass door. “Can’t say much more and don’t want to declare anyone dead, but it’s bad,” he added.

“There is nothing more terrifying than hearing multiple people get shot while you're under your desk and then hear the gunman reload,” wrote Davis, who covers crime for the newspaper.

In a later interview, Davis said the newsroom “was like a war zone” and the scene 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.”

Davis said he didn’t know why the shooter stopped firing, but said police officers surrounded the suspect once they arrived.

Anne Arundel Police tweeted on Thursday afternoon that the building had been evacuated and there were “officers continuing to search building.” Police officers, who responded to the scene within a minute of receiving a call about an “active shooter,” went “floor by floor” to secure the building, and asked people in the area to “to shelter in place as a precaution.” Reuters reported that police are treating the shooting as a “local incident,” and they do not believe it is terror related.

The Capital Gazette is owned by the Baltimore Sun Media Group, a Tronc, Inc. company. Police also swept the offices of The Baltimore Sun after the incident. The Sun reported that there was “no threat” on its newspaper, according to police, and “their presence was a precaution.”

The New York Police Department is reportedly dispatching personnel to the “headquarters of all major media outlets” in the city out of an “abundance of caution,” ABC News reports. Police in Los Angeles have also beefed up the security of major news outlets with additional patrols for “reassurance.”

President Donald Trump tweeted that he was briefed about the shooting before leaving Wisconsin. “My thoughts and prayers are with the victims and their families. Thank you to all of the First Responders who are currently on the scene,” he wrote.

In a statement, Maryland Gov. Larry Hogan said that there was “no place in society for this kind of hatred and violence, and the shooter “must be prosecuted to the fullest extent of the law.” Sen. Chris Van Hollen also wrote, “Journalists shouldn’t have to fend off bullets in the newsroom while doing their jobs—this is not normal.”

Despite the shooting, newspaper staff announced on social media that there would be a Friday edition of the paper out tomorrow.