The 38-year-old man suspected of killing five people at the offices of a Maryland newspaper group on Thursday had a long-running feud with the Capital Gazette, attacking the Annapolis-based family of publications in the courts and on social media.

Police identified the suspect as Jarrod Warren Ramos, law enforcement sources told the Capital Gazette and other US media.

A resident of Laurel, Maryland, Ramos sued the newspaper and one of its journalists in 2012, alleging defamation,

Almost a year earlier, Thomas Hartley, a former columnist for The Capital, one of the group's papers, wrote a column describing the suspect's interactions with an unnamed woman Ramos contacted over Facebook, court documents showed. Hartley said Ramos sent her numerous emails in which he called her vulgar names and told her to kill herself.

The lawsuit named Hartley, its then editor-publisher Thomas Marquardt, and Capital-Gazette Communications, then the parent company of the paper.