A gunman who blasted his way into the Capital Gazette newspaper offices in Annapolis, Maryland, on Thursday afternoon and killed four journalists and a sales assistant had a long-standing feud with its owner, Baltimore Sun Media Group, Baltimore Sun reported.
Jarrod W. Ramos, 38, of Laurel had filed a defamation suit in July 2012 against a columnist, editor and publisher of the Capital Gazette over a write-up on a criminal harassment case against him.
A court ruled for the Capital Gazette and an appeals court upheld the ruling.
Neither the columnist, Eric Hartley, nor the editor and publisher, Thomas Marquardt, are employed by the Capital Gazette. They were not present during the shooting.
This was a targeted attack on the newspaper, said Anne Arundel County Deputy Police Chief William Krampf.
The suspect entered the building with a shot gun, walked through the lower level, looked for his victims and shot them. He used smoke grenades in the attack.
Krampf said a carnage was prevented as police quickly responded to the shooting at 2.45 pm (1845 GMT). They entered the building in minutes and escorted some 170 people out safely.
Among the five dead were Rob Hiaasen, 59, an assistant editor and columnist, Wendi Winters, 65, a community correspondent, Gerald Fischman, 61, the editorial page editor, John McNamara, 56, a staff writer, and Rebecca Smith, 34, a sales assistant.
Rachael Pacella, a reporter, and Janel Cooley, a sales representative, were treated at a local medical centre and discharged.
Photographer Paul Gillespie said he hid under a desk in the newsroom when he heard the shots and the glass door shatter. The suspect walked in, looked for his victims and kept shooting. When the shooting stopped for a few seconds, Gillespie ran out to a nearby bank and asked the staff to call the police.
Gazette editor Jimmy DeButts wrote on Twitter that he is devastated and heartbroken. He said his team worked hard to report on life in Annapolis.
President Donald Trump wrote on Twitter that his thoughts and prayers are with the victims and their families.
White House spokeswoman Sarah Sanders tweeted a violent attack on innocent journalists doing their job is an attack on every American.