Updated at 10:15 a.m. ET
The man suspected of fatally shooting five people and wounding two others at the newsroom of the Capital Gazette in Annapolis, Md., had filed a lawsuit over the coverage by one of its publications, The Capital newspaper, of a criminal harassment charge against him.
For years prior to the attack on Thursday afternoon, authorities say Jarrod W. Ramos, 38, had used social media to excoriate the paper, along with the prosecutors and judges in his case, setting up a Twitter account that he said was dedicated to defending himself and "making corpses of corrupt careers and corporate entities."
On the suspect's Twitter feed, countless tweets over the years documented his legal troubles and complaints about the media in minute detail, frequently attacking journalists by name.
That Twitter account went silent in January 2016. However, about an hour before the shooting, a single tweet was posted: "F*** you, leave me alone."
Authorities say Ramos, who was apprehended, used a shotgun and smoke or flash-bang grenades in the attack. By Thursday evening, police had blocked off the street to the suspect's home in Laurel, Md., about 25 miles from Annapolis.
Anne Arundel County acting Police Chief Bill Krampf called it "a targeted attack" on the newsroom.
"This person was prepared to shoot people. His intent was to cause harm," Krampf said.
Ramos filed a failed lawsuit in 2012, alleging that a columnist and an editor at the newsroom defamed him in a Capital article about his conviction in a criminal harassment case in 2011, according to The Associated Press.
Tom Marquardt, the newspaper's former editor and publisher, told the Capital Gazette on Thursday that during his tenure, the escalating harassment of journalists on Ramos' social media accounts had raised red flags. In 2013, Marquardt said he had even spoken to police about filing a restraining order against Ramos.
"I was seriously concerned he would threaten us with physical violence," Marquardt said. "I even told my wife, 'We have to be concerned. This guy could really hurt us.' "
"I remember telling our attorneys, 'This is a guy who is going to come in and shoot us,' " he said.
A Maryland state lawmaker recently introduced a bill that would require people who receive a peace order against them to surrender any firearms to law enforcement for the duration of the order.
In 2015, Ramos tweeted the names of two Capital Gazette staffers whom he said he would like to see "cease breathing."
In 2011, days after Ramos pleaded guilty to criminal harassment, The Capital published a story detailing the allegations against him.
According to the article, "out of the blue," Ramos sent a friend request on Facebook to a woman who had been a high school classmate, thanking her "for being the only person ever to say hello or be nice" to him, the article said.
The woman said Ramos told her that he was having some problems, so she suggested he see a counselor.
"I just thought I was being friendly," she told the newspaper.
What followed was "months of emails in which Ramos alternately asked for help, called her vulgar names and told her to kill herself. He emailed her company and tried to get her fired," the articles said, according to court documents.
The woman called police, and the emails stopped for months, only to start again "nastier than ever," according to the article.
The article had identified Ramos as a U.S. Bureau of Labor Statistics employee with no criminal record and a degree in computer engineering, according to The Baltimore Sun.
The AP writes:
"In his lawsuit [against the newspaper], Ramos said the article contained false and defamatory statements, and injured his reputation.
"A judge dismissed the suit. The judge asked Ramos to point out a single statement in the article that was false or to give a single example of how it had harmed him. 'He could not do so,' an appeals court wrote in upholding the dismissal."