Five people died and three were injured after a gunman opened fire at the office of the Capital Gazette, a community newspaper in United States’ Maryland, on Thursday afternoon, Reuters reported. Police have called it a “targeted attack”. They found the suspect hiding under a desk in the building and took him into custody.

Security at news offices in other cities has been heightened after the attack in Annapolis, the state’s capital city. Police evacuated 170 people from the building, which has other offices too.

The suspect, said to be a white male in his late 30s, entered the building with a shotgun and walked through the lower level of the building, where the newspaper is housed, local police told CNN. Police could not confirm whether the gunman was targeting anyone in particular or just the newspaper. “This person was prepared to shoot people,” a police officer said. “His intent was to cause harm.”

The suspect, said to be Jarrod W Ramos, had a long-standing dispute with the newspaper, unidentified officials told the Baltimore Sun, the largest newspaper of Maryland state and the owner of the Capital Gazette. Ramos had sued the newspaper’s former editor, publisher and a columnist for defamation in 2012, but had lost the suit three years later.

The newsroom looked “like a war zone” during the incident, Capital Gazette crime reporter Phil Davis told the Baltimore Sun. The suspect appears to have damaged his fingertips to avoid being found and is refusing to cooperate with law enforcement, local media reported.

Capital Gazette is one of the oldest newspapers in America. It was founded in Annapolis in 1884.