Police at the Capital Gazette newspaper after multiple people were shot. Photo / AP
Five people are dead and many others have been "gravely injured" in a mass shooting at Maryland's Capital Gazette newspaper headquarters in Annapolis.
Police also found an "explosive device" in the newspaper office after the shooting, which was one of the deadliest attacks on journalists in US history.
Police said the suspect was a white man in his late 30s whose rampage at the Capital Gazette followed social media threats directed at the newspaper.
He entered the building and "looked for his victims". He threw smoke grenades and fired a shotgun at his victims, according to Anne Arundel County Acting Police Chief William Krampf.
Anne Arundel County police spokesman Lieutenant Ryan Frashure said a white male is in custody.
The shooter reportedly used a "long gun" and a law enforcement official who spoke on the condition of anonymity said he had mutilated his fingers in what investigators believe was an effort to prevent him from being identified.
However, he said police had identified the man.
"We're still talking to the individual, we're engaging the individual, we're trying to find a motive," Frashure said.
Phil Davis, a Gazette reporter who was in the office when the shooter opened fire, about 3pm (local time) said multiple people had been shot.
"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," Davis wrote on Twitter as he waited to be interviewed by police.
"There is nothing more terrifying than hearing multiple people get shot while you're under your desk and then hear the gunman reload."
A single shooter shot multiple people at my office, some of whom are dead.
In an interview with the Capital Gazette's online site, Davis said it "was like a war zone" inside the newspaper's offices, scenes 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 traumatising it is to be hiding under your desk, you don't know until you're there and you feel helpless."
Davis told the site he and others were still hiding under their desks when the "lone male" shooter stopped firing. "I don't know why he stopped," he said.
"Active shooter at 888 Bestgate please help us," tweeted Anthony Messenger, a Gazette intern, according to his Twitter account.
Frashure said the building was now secure. About 170 people who were in the offices were evacuated to a nearby mall.
An intern with Capital Gazette had earlier tweeted asking for help as the shooting started.
"It's crazy. You see these things on the news but you never think it's going to happen to you," she said.
A co-worker told her an active shooter was in the building.
Her first thought was to find a room to barricade herself. She had four others crammed into the room. They called 911 and stayed there until police banged on the door.
"I started praying," she said tears filling her eyes. "You just think 'is this going to be my last day?'"
Rescue helicopters are on the scene and TV cameras have captured injured people being flown away.
The Capital Gazette newspaper is owned by the Baltimore Sun.
Annapolis is the capital of the US state of Maryland.
US President Donald Trump has been briefed on the shooting in Maryland and has tweeted his "thoughts and prayers are with the victims and their families".
The Capital Gazette is a daily newspaper that serves Anne Arundel County, Annapolis and Kent Island in Maryland. The newspaper also publishes community newspapers including the Bowie Blade-News and the .
Arminta Plater, a spokeswoman for a hospital near the newspaper, said two people had arrived there but she did not know their conditions.
As news of the shooting broke, the New York Police Department sent counter-terrorism teams to news media organisations, including the New York Times, ABC News and Fox News.
Deputy Commissioner for Counterterrorism and Intelligence John Miller said the action was not based on any specific threats, but out of "an abundance of caution". He says the NYPD was monitoring the Maryland shooting.
Anne Arundel County executive Steve Schuh said the suspect "has not been very forthcoming" with information.
Schuh adds: "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."