A California man accused of plotting to bomb Muslims on their way to worship accepted a plea deal that dropped the most serious charges against him.

William Celli admitted last week that he attempted to violate the free exercise of civil rights and was sentenced to 90 days in a county jail and three years of probation, reported KRON-TV.

Police arrested the 55-year-old Celli on Dec. 20, after witnesses said he yelled, “I’m going to kill you all,” outside the Islamic Society of West Contra Costa County.

ADVERTISEMENT

Detectives searched Celli’s home, where they called in a bomb squad to detonate a suspicious device.

Celli posted frequently on his Facebook account, where he complained about Syrian refugees, Democrats and insufficiently conservative Republicans.

He appears to be a strong admirer of GOP frontrunner Donald Trump — who was stoking Islamaphobic fears in the weeks prior to Celli’s arrest in the wake of mass shootings in Paris and San Bernardino, California.

“Donald trumps on again I’m happy leaders okay but this guys a great point man I’ll follow this MAN to the end of the world,” Celli posted Oct. 21.

“Donald Trump’s on again I’m feeling good about myself,” he posted Oct. 28.

ADVERTISEMENT

Celli, a self-employed plumber who complained last year that he had lost work to undocumented migrants, also expressed qualified support for Democratic presidential candidate Hillary Clinton.

“Hillary Would make a great president,” he posted Oct. 22. “If she would commit to what she is hiding. But she has to crucify the president. Then her run for the White house is over.”

The plea agreement Celli accepted forbids him from having an active Facebook account for an unspecified period of time.

ADVERTISEMENT

Prosecutors agreed to drop a charge of making criminal threats, with a hate crime enhancement, in exchange for Celli’s guilty plea to the civil rights violation.

He also agreed to take anger management courses, and the court imposed some criminal protection orders against him.