When a neo-Nazi sympathizer killed a woman by ramming his car into a protest crowd in Charlottesville in August, a Massachusetts police officer mocked the incident on Facebook. “Hahahaha love this,” he wrote.

That post has now gotten him fired.

“It will take us months, if not years, to earn back the level of public trust we once had,” Springfield Police Commissioner John Barbieri said during a press conference announcing the officer’s termination on Friday. “It’s never easy to terminate a fellow officer, and I take no comfort in doing so.”

The officer, Conrad Lariviere, became the object of national outrage after he commented on a breaking news Facebook post from conservative commentator Ben Shapiro about the attack in the Virginia college town on Aug. 13, which killed 32-year-old Heather Heyer and injured 19 others.

“Hahahaha love this,” Lariviere wrote. “Maybe people shouldn’t block roads.” When another commenter challenged him, Lariviere wrote that he was a police officer who’d been hit by a “shitbag with warrants” in the past.

“But who cares right, you ignorant brat?” Lariviere retorted in the Facebook thread. “Live in fantasy land with the rest of America while I deal with the real danger.”

The Springfield Police Department acted swiftly and launched an internal investigation into Lariviere’s comments the same day as the attack. The Police Community Relations Board also launched an independent investigation that day and concluded that Lariviere had violated departmental rules about how officers are expected to conduct themselves off-duty.

“We had thousands of signatures on a petition, and we had inquiries from civil rights attorneys,” Barbieri said on Friday. “It just garnered so much attention, we felt a need to get out in front, and to be transparent in the dismissal was critical.”

The situation underscores an issue that many police departments have increasingly found themselves navigating. While most departments have “off-duty” conduct regulations, not all have explicit policies that address social media.

Springfield Police Department doesn’t currently have a social media policy, Masslive.com reported, but it’s currently negotiating one with its union.

Springfield Mayor Domenic Sarno praised Barbieri’s decision to terminate Lariviere’s employment, after speaking out about the officer at the time of the incident.

“I just got done issuing a statement this morning on how upsetting the tragic incidents were in Charlottesville, Virginia, and one of our own officers does this?” Sarno wrote in a press release on Aug. 14, one day after the attack. “Unbelievable! There’s no place for this in our society, let alone from a Springfield Police Officer.”

Lariviere has suggested he intends to appeal the decision through an arbitration hearing, Masslive.com reported, which can take up to a year. “I’m a good man who made a stupid comment and would just like to be left alone,” he told MassLive on Aug. 14.