ANNAPOLIS, Md. (CBSNewYork/AP) — Five people were killed and two others injured Thursday when a gunman opened fire on a newspaper office in Annapolis, Maryland.

Law enforcement sources told CBS News the suspect is 38-year-old Jarrod Ramos, who allegedly made social media threats against the Capital Gazette, as recently as earlier in the day. According to court documents, Ramos was once accused of stalking a woman online, and the newspaper covered the case. He sued for defamation in 2013 and lost.

READ MORE: New York Weather: CBS2’s 11/28 Sunday Morning Forecast

Late Thursday night, police identified the victims as Wendi Winters, Rebecca Smith, Robert Hiaason, Gerald Fischman and John McNamara. Four were editors, one was a sales assistant.

More From CBS News | CBS Baltimore

“I was on the phone with a client and I heard a loud noise, like an incredibly loud bang,” one witness said. “I saw a guy holding a gun. The door of the Capital Gazette had been blown to pieces, it was in shattered pieces all on the carpet. And this guy was holding what looked like a big shotgun and moving across the entrance of the Capital Gazette office pointing the gun deeper into the office.”

Police said the suspect was armed with a shotgun when he stormed the building around 3:30 p.m. Thursday.

“This was a targeted attack on the Capital Gazette,” Anne Arundel County Acting Police Chief William Krampf said. “He entered the building with a shotgun and he looked for his victims, as he walked through the lower level.” 

Capital Gazette reporter Phil Davis posted a series of tweets describing the scene inside the office.

“When it first started to happen, you just immediately go into panic mode,” he later said in an interview. “He was going down our newsroom, starting from the front, just continually shooting people. At one point, I’m pretty sure I heard him reload.”

Columnist Terry Smith said the building is vulnerable to this type of attack.

“Going to the Annapolis Capital is like walking into a grocery store. I mean, it’s totally open. There’s not a shred of security,” he said. “It’s in a four-story brick and glass office building.”

A law enforcement source told CBS News the suspect damaged his fingertips to conceal his identity. Authorities used facial recognition to find out who he was.

READ MORE: Alec Burks, Evan Fournier Spark Knicks Past Hawks

“We are working on now securing his residence. He does live in the state of Maryland. We are in the process of securing that residence and preparing for search warrants,” said Kramf.

Investigators said they also found smoke bombs and flash grenades inside his backpack.

“We have members of the bomb squad on scene. We don’t anticipate having any more explosive devices,” Kramf said. 

Gov. Larry Hogan said emergency responders were on the scene within 60 seconds, likely stopping the gunman in his tracks.

“Our thoughts and prayers are with the victims and their families, and I want to thank the law enforcement professionals who responded — our emergency response team did an incredible job,” he said.

President Donald Trump offered his “thoughts and prayers” on Twitter.

In New York City, the NYPD deployed counterterrorism teams to media organizations in and around the city.

About 170 people were evacuated from the building as police cars and other emergency vehicles converged on the scene. People could be seen leaving the building with their hands up.

The newspaper is part of Capital Gazette Communications, which also publishes the Maryland Gazette and CapitalGazette.com.

A GoFundMe account has been set up to help pay for medical bills, funeral costs, newsroom repairs and other expenses. The newspaper vowed to publish an edition Friday morning.

MORE NEWS: Suns Extend Win Streak To 16 With Victory Over Nets

(© Copyright 2018 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)