A New Jersey deputy mayor compared undocumented immigrants to “rabid, messy raccoons” infesting basements — and President Donald Trump to an exterminator — in an inflammatory Facebook post on Sunday.

Mendham Township Deputy Mayor Rick Blood apologized and removed the comment the night he posted it after receiving angry reactions from stunned locals — even though he had earlier defended the comments with additional posts.

Blood, who also runs the public works department in Roxbury, New Jersey, will face residents and officials Monday night at a Mendham Township Committee meeting where his comments will be discussed.

“This has really turned into quite an uncomfortable situation,” Blood told the Daily Record on Monday. “We’re all waiting to see what the public side is going to be. It was a bonehead thing to do, but that’s not racial.”

Blood said in a subsequent Facebook post that his comments weren’t intended to be offensive. But he conceded that the outraged reaction “led to some introspection” on his part. He said the statement was copied from elsewhere and intended to “illustrate — however poorly — one of the reasons our president was elected.”

He added: “I didn’t realize how crude it would be received by others.”

Almost all responses to Blood’s apology post were angry, with several people calling for his resignation. One writer noted that referring to extermination and calling immigrants “vermin” was “trafficking in the language of genocide.”

Blood didn’t reveal the origin of his first post. But the language appeared word-for-word in a 2016 comment to a Breitbart story.

It was also similar to remarks by Carl Paladino, who co-chaired Trump’s New York campaign, when he talked to NPR in 2016.

“People that get on this bus, on the Trump bus, are people that are very, very frustrated with their government,” Paladino said on “Morning Edition.”

“It doesn’t matter what kind of person is the exterminator, okay? They want the raccoons out of the basement.”

Blood was appointed to fill a vacancy on the Mendham Township Committee in December, a month after he lost a race for a open seat on the committee to Democrat Amalia Duarte ― a major upset in former Republican Gov. Chris Christie’s hometown.