A New Jersey deputy mayor has resigned from his position after he posted an extended Facebook rant comparing United States immigrants to "rabid, messy raccoons."

Rick Blood, who was until Monday (12 February) night deputy mayor of Mendham Township, posted the outburst in an attempt to help people make sense of Donald Trump's tough immigration laws. He has since deleted the post and apologised.

His analogy comparing immigrants to rabid raccoons reads: "You've been on vacation for two weeks, you come home, and your basement is infested with raccoons. Hundreds of rabid, messy, mean raccoons have overtaken your basement. You want them gone immediately. You call the city, four different exterminators, but nobody can handle the job."

"But there is this one guy and he guarantees you to get rid of them, so you hire him. You don't care if the guy smells, you don't care if the guy swears, you don't care if he's an alcoholic, you don't care how many times he's been married, you don't care if he voted for Obama, you don't care if he has a plumber's crack, you simply want those raccoons gone! You want the problem fixed! He's the guy. He's the best. Period!"

"Here's why we want Trump, yes he's a bit of an ass, yes he's an egomaniac, but we don't care."

After first defending the post, Blood conceded it may not have been the best decision to upload it. "I didn't realise how crude it would be received by others," Blood said, according to the Huffington Post. "There's plenty I would take back."

According to the Daily Record, his apology post read: "The purpose of the post was to illustrate, however poorly, one of the reasons our president was elected. Which was to clear the log jams in Washington. Yes this post will be construed as offensive to some, however it was not its intent. It is out in the public sphere and as such it is likely to exist in the digital world for quite a while. I apologise for the post."

At a Township Committee meeting on Monday (12 February) night, Blood said he had no intention of resigning. Following the meeting, however, Mayor Richard P. Diegnan Jr. announced that Blood had agreed to step down.