A Michigan city worker was fired over an anti-Muslim Facebook post about a Sports Illustrated model that he tried to cover up, insisting he was hacked.

Bill Larion, 58, was axed Wednesday by Dearborn officials, four days after he denigrated Somali-American model and activist Halima Aden by comparing her to a camel. The part-time surveyor for the city’s engineering division made the degrading remark while off-duty, the Detroit Free Press reports.

Larion later told several people, including a Dearborn police officer, that his Facebook account had been hacked and that he wasn’t responsible for the post. But he acknowledged on Tuesday through an attorney that he was behind the revolting post.

Instead of gracing the cover of Sports Illustrated, Larion said Aden should be on the front of “Camels are us,” the Detroit News reports, citing the Michigan chapter of the Council on American-Islamic Relations. Aden, 21, became the first hijab-wearing woman to appear in the annual Sports Illustrated Swimsuit issue while wearing a burkini. The magazine hit newsstands on Wednesday.

“He made a mistake, he stepped forward to admit and apologize and tried to move forward toward a healing based upon the ill-will he created,” Larion’s attorney, Ed Zelenak, told the newspaper, adding that city officials missed an opportunity for a “teaching moment” by allowing Larion to keep his job.

Zelenak, who called the firing unfortunate, said he planned to have Larion take part in diversity forums to help rehabilitate him in a city that is more than 46 percent Arab American. It’s unclear where Larion will work next, Zelenak said.

“At this point in his career, it leaves him with few options,” the attorney said.

City officials, meanwhile, said in a letter obtained by the newspaper that Larion’s post and subsequent actions to hide his actions didn’t fit with Dearborn’s mission to “deliver superior public service” and to earn the public’s trust.

“Our trust, as well as the public’s trust, in your ability to perform your job in an impartial and truthful manner has been irreversibly damaged by your actions,” the letter read.

The city’s mayor declined to comment on Larion’s firing Wednesday, but said earlier that Dearborn had “zero tolerance” for prejudice from municipal workers.

Larion, of Lincoln Park, has acknowledged that he has only himself to blame for being jobless.

“I Bill Larion have one to blame by [myself] for my bad behavior,” he wrote in a handwritten letter obtained by the Free Press. “I want to apologize for my horrible comment … I want to do better for my community and family. I hurt not only my family but my coworkers and my community and people I don’t even know.”