(CNN) Five people were killed Thursday and two were injured in a "targeted attack" on the Capital Gazette newspaper in Annapolis, Maryland, authorities said.

A gunman opened fire through the glass door of the newsroom, Phil Davis, a Capital Gazette police reporter, tweeted shortly after the shooting. "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.

The five victims were all employees of the Gazette, according to police, including several journalists.

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.

The suspected gunman entered the building with a shotgun and smoke grenades and walked through the lower level of the building, where the newspaper is housed, Anne Arundel County deputy police chief Bill Krampf said.

"This was a targeted attack on the Capital Gazette," Krampf said.

He said police don't have knowledge that the gunman was targeting anyone in particular and can't confirm whether the suspect knew employees at the paper or just targeted the publication.

The suspect "possibly" had a connection to the paper through social media, according to Krampf

"This person was prepared to shoot people. His intent was to cause harm," he said.

The suspected gunman, who authorities said was a white male in his late 30s, was found hiding under a desk in the building, Anne Arundel County Executive Steven Schuh told CNN.

He was taken into custody and is being interviewed, police said. Authorities do not yet know what the motive for the shooting might be.

Two law enforcement sources said his fingerprints appear to have been altered, making it difficult to identify him that way. He was identified using facial recognition software, according to one law enforcement source.

Authorities have not released the suspect's name, but multiple law enforcement sources identified him as Jarrod Warren Ramos. Police are outside an address connected to Ramos in Laurel, Maryland.

Ramos has a connection to the paper , the sources said. He filed a defamation claim in 2012 against the paper but the case was dismissed.

'Like a war zone'

Schuh said authorities responded to the shooting in "60 seconds."

"They went immediately into that building without a moment's hesitation and demonstrated incredible courage," he said. "It could have been a lot worse."

An employee on lockdown in a nearby building said responding officers "were hustling." Authorities evacuated about 170 people from the building, which is also home to other businesses and doctors' offices, said Lt. Ryan Frashure of the Anne Arundel County Police.

Daria McMiller, who works as an administrative assistant in a building next to the Capital Gazette building, said she was very impressed with the police response.

A newspaper stand selling the Capital Gazette.

McMiller said she and her co-workers didn't hear any shots but they heard authorities yelling and saw police, FBI, state troopers and SWAT swarming to the scene.

"Some of them were still in civilian clothes and they were pulling their vests on as they ran towards the building," she said.

Four of the dead were killed at the scene; a fifth person, who was shot in the upper body and arm, died at the University of Maryland Medical Center, Schuh said.

In an interview with the Baltimore Sun , Davis, the reporter, said the newsroom "was like a war zone".

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

'He believed profoundly in the craft'

Police identified the victims as Wendi Winters, who worked in special publications; Rebecca Smith, a sales assistant; Rob Hiaasen, an assistant editor; editorial page editor Gerald Fischman; and John McNamara, a staff writer.

Clockwise from top left: Robert Hiaasen, Wendi Winters, Gerald Fischman, John McNamara and Rebecca Smith (center.)

In a Facebook post, author Carl Hiaasen said he was "devastated and heartsick" to confirm the death of his brother, affectionately known as "Big Rob" because he towered over people.

Hiaasen said his brother, who was an editor and a columnist at the paper, was "one of the most gentle and funny people I've ever known."

"He spent his whole gifted career as a journalist, and he believed profoundly in the craft and mission of serving the public's right to know the news," Hiaasen wrote.

'A newspaper we live with every day'

Susan O'Brien, a spokeswoman for the city of Annapolis, said the publication "is a newspaper we live with every day."

"Our hearts are with the family," she told CNN.

Earlier, Gov. Larry Hogan tweeted he was "absolutely devastated to learn of this tragedy in Annapolis."

"Devastating. My heart is with Capital Gazette and the people of Annapolis right now," Maryland Sen. Ben Cardin tweeted.

JUST WATCHED Witness: I need more than thoughts and prayers Replay More Videos ... MUST WATCH Witness: I need more than thoughts and prayers 03:07

Capital Gazette Communications publishes multiple newspapers, including the Capital and the Maryland Gazette.

The Capital is one of America's oldest newspapers, beginning life as the Evening Capital in 1884.

The company that publishes it started in 1727 with the Maryland Gazette. In 1767, Anne Catharine Green became the first female newspaper publisher in the country and the Maryland Gazette fought the stamp tax that started the American Revolution.

For many decades, there were two papers that served the region -- The Maryland Gazette, a weekly, and the Evening Capital, a daily.

In 1981, The Evening Capital became The Capital. And in 1994, the company that owned it launched one of the first newspaper websites in the US with CapitalOnline.com.

Today, The Capital serves Annapolis, Anne Arundel County and Kent Island. It has a daily readership of about 67,000 and a Sunday readership of 83,000, according to the Baltimore Sun Group, which owns it.

'We are putting out a damn paper tomorrow'

I can tell you this: We are putting out a damn paper tomorrow. — Chase Cook (@chaseacook) June 28, 2018

The Capital Gazette had been threatened on social media as recently as Thursday, Krampf said. He said authorities are trying to confirm what account the threats came from and who sent them.

He said the threats "indicated violence."

Threats against journalists have been on the rise recently. Press freedom groups have also reported an increase in physical assaults on reporters, particularly at campaign events and other political venues.

JUST WATCHED Wife: We planned to open birthday gift tonight Replay More Videos ... MUST WATCH Wife: We planned to open birthday gift tonight 01:02

Gazette reporters said their staff is small, and they are determined not to let the shooting deter them from their doing their jobs. Despite the shooting, they still planned to publish a paper T hursday night.

Multiple newsroom staffers, plus reporters from The Baltimore Sun, are working on stories for Friday's edition.

"The Capital is not a big newsroom. There are about 20 news staffers, a few more advertising. We are close. We are family. I am devastated," tweeted Danielle Ohl, a reporter.

"I can tell you this: We are putting out a damn paper tomorrow," another reporter Chase Cook tweeted.