Editor’s note: This story contains objectionable language.

AUGUSTA — A Democratic state lawmaker from South Portland posted a vicious attack on President Donald Trump on social media that included the assertion that Trump “is a half-term president, at most, especially if I get within 10 feet of that (unprintable slur).”

Rep. Scott Hamann also said in a profanity-laden Facebook post that Trump is “a complete loser” and “a joke” who “was installed by the Russians.”

When news broke about Hamann’s post, Republicans quickly called for his resignation.

Hamann said he regretted his “impulsive decision to post something aggressively sarcastic and inappropriate in a Facebook exchange with a childhood friend.”

“While the tone of the post was born out of frustration with the vile language currently surrounding politics, I should not have responded with the same language,” he said in a written statement. “This is not language I typically use, it does not reflect my personal values, and while misguided, it was intended to make a visceral point about the devolving political discourse in America.”

Hamann made the comments about Trump in a public post on a friend’s Facebook wall that was seen by a New Hampshire legislator who passed it along to a conservative radio host, Keith A. Hanson. Hanson posted them on Twitter.

Hamann, who’s in his third term, is a project manager for a food bank. He serves on the Legislature’s Health and Human Services Committee and the Joint Select Committee on Marijuana Legalization Implementation.

In private messages with Hanson, Hamann said his posts were part of an exchange with “a childhood friend of mine” with whom he has “an aggressively satirical relationship.”

His friend, Mark Anderson, defended Trump, insisting the president is “doing a good job” and pointing out the stock market is up.

In response, Hamann said he would “circle back when the house of cards collapses. And if I run into your wife/girlfriend, I’ll be sure to follow Trump’s Access Hollywood advice” about the treatment of women.

Much of what Hamann wrote is not fit for publication because of its profuse use of foul language.

In a message to Hanson in response to the radio host’s threat to inform the lawmaker’s employer about his posts, Hamann said the only swear words he used were “ass, pricks and Trump. Too much for a snowflake.”

But he actually relied repeatedly on a slur that is both well known and often used in less-than-polite company.

In one long post, Hamann called Trump “an admitted rapist” who “inserts his fingers into women against their consent.” He asked his friend if he would leave his wife alone in a room with the president.

“He’s an out-of-the-closet racist,” Hamann charged, as well as a liar. He referred to “the Trump crime family.”

Hamann said that Trump backers are “destroying America” and that “100 percent of intelligent Americans agree that Trump is a complete loser.”

“But go back to clinging to your guns because you’re afraid,” Hamann said, adding that it’s not only Trump supporters “who can talk like complete assholes.”

He vowed to match them “word for word” before issuing his declaration about Trump serving half a term at most.

Hanson does a four-hour daily talk show on weekdays on a Fox News-affiliated radio station in New Hampshire. He said he is often fed stories by his legislator friend who keeps an eye on posts by political opponents.

He said that if “any Joe Blow” had written what Hamann did, he would think “no biggie.”

“But from an elected official? Especially when Republicans/conservatives get hammered all the time for what they write?” he asked.

“I don’t deal well with double standards,” Hanson said.

Maine Republican Party Chairman Demi Kouzounas called Hamann’s post “unhinged and dangerous” in a written statement Wednesday.

“Words cannot even begin to describe the level of revulsion I feel after reading Rep. Scott Hamann’s recent tirade that has come to light,” she said.

“I not only call on, but demand that Speaker Sara Gideon actually do something about her unethical and radicalized caucus,” Kouzounas said. “Is this language and behavior that she is willing to accept from Democrat Representatives? She has a choice to make. I know what mine would be if I were in her position.”

[email protected]

State Rep. Scott Hamann, D-South Portland

Comments are not available on this story.