The suspected killer in a mass shooting at Annapolis, Maryland’s Capital Gazette newspaper, 38-year-old Jarrod Ramos, had previously waged a years-long campaign against the paper through social media and the court system after the newspaper reported in 2011 on his guilty plea in a vicious harassment case.

Ramos filed a defamation suit against the newspaper, but had his case and his appeal tossed by judges. But he continued to rail against the Capital Gazette for years, including on Twitter—where his profile picture was a crude photoshop of a sacrificial symbol onto the head of the journalist who wrote the Capital Gazette story about him.

On Thursday afternoon, Ramos allegedly entered the Capital Gazette newsroom with smoke grenades and a shotgun. He is accused of opening fire on the room, killing five people, and wounding several more. He was taken into custody alive.

Zak Shirley, a lawyer who represented the Capital Gazette in the defamation case, said Ramos—whom law-enforcement officials identified as a suspect to the Associated Press Thursday night, hours after the attack—regularly made threats on his Twitter account. Shirley told The Daily Beast that people involved in the case were “absolutely” concerned about violence.

“We were concerned about him at the time, it definitely came up more than once,” Shirley said. “And it was because of his Twitter feed.”

Ramos’ Twitter profile picture was a photo of a Capital Gazette journalist who wrote a 2011 column about the harassment case. Ramos photoshopped the picture to include the “Brand of Sacrifice,” a symbol from the Japanese manga and anime series Berserk, on the journalist’s head. The series describes ritual murder for people marked with the brand.

On the page, Ramos frequently tweeted vitriol and violent threats at both the Capital Gazette and judges he’d dealt with.

“Referring to @realDonaldTrump as ‘unqualified,’” he tweeted at the newspaper in 2015, “@capgaznews could end badly (again).”

When a horror movie was filmed at the newspaper’s former offices in 2015, Ramos tweeted about the paper being “blood-stained.”

“2000 Capital Drive, just as @capgaznews left it,” he wrote, “passes for authentic office of blood-stained tabloid publication.”

“I’ll enjoy seeing @capgaznews cease publication,” he tweeted earlier that year, “but it would be nicer to see [two Capital Gazette staffers] cease breathing.”

And in 2013 he tweeted about Rob Hiaasen, a Capital Gazette staffer who was the first confirmed casualty of the mass shooting. “Come punitive damages, you’re still not ready,” he tweeted at Hiaasen. “Love, /The Killjoy/.”

Many of Ramos’ tweets referenced his failed legal efforts against the Capital Gazette. He filed a suit against the newspaper after it published an article on a case in which Ramos pleaded guilty to harassing one of his high-school classmates.

The Capital Gazette story was based on his interactions with a woman he added on Facebook years after their high-school graduation. Although the woman did not immediately remember him, Ramos sent her pictures to prove that he had attended school with her.

“He was having some problems, so she wrote back and tried to help, suggesting a counseling center,” the woman told the Capital Gazette in 2011. “I just thought I was being friendly.”

But Ramos reportedly became violent over email, calling her vulgar names and urging her to kill herself for months. The woman tried cutting off contact and blocking Ramos on Facebook, but the harassment intensified.

“Have another drink and go hang yourself, you cowardly little lush. Don’t contact you again? I don’t give an [expletive],” the Capital Gazette quoted one of his emails as saying. “[Expletive] you.”

Ramos also started contacting the woman’s workplace in a bid to get her fired. His victim said she was placed on probation after he called and emailed the bank where she worked. When she was laid off shortly thereafter, she suspected Ramos to be behind the decision.

Ramos pleaded guilty to one count of misdemeanor harassment in the case, but a judge allowed him to strike the conviction and enter “probation before judgment,” a Maryland ruling that allows a person who pleads guilty to serve their probation, without a conviction going on their permanent record.

Even after his case against the Capital Gazette was dismissed, Ramos continued to issue threats against the paper and its staff.

“He carried on a hateful diatribe online for years,” Shirley said.