A Republican running for Congress in Connecticut’s 2nd District abruptly dropped his bid on the day of the primary following his arrest a day earlier.

Thomas Gilmer of Madison was arrested by Wethersfield police late Monday, a department official confirmed. He was charged on a warrant with first-degree unlawful restraint and second-degree strangulation and posted a $5,000 bond.

Sources told the Hartford Courant the charges stem from a violent altercation with a former girlfriend. Police said they were first contacted July 22 and opened an investigation.

Gilmer, the Republican Party's endorsed candidate, released a statement blaming his primary opponent, Justin Anderson, for "slinging mud."

"Now I find myself in a position where I must put my family and our shared Republican values before my own interests," Gilmer wrote. "I cannot in good conscience move forward in this campaign while I am simultaneously forced to clear my name. And clear my name I will."

Accusations about Gilmer have been swirling in Republican circles for months. Party Chairman J.R. Romano said Anderson told him in April or May that there was a video of the fight, which the party chairman told Anderson to turn over to police.

Romano, who has come under fire for not calling for Gilmer to step out of the race earlier, also recommended that the victim meet with a domestic violence counselor and passed along contact information, he said.

"When someone came to us with allegations, we encouraged them to go to the authorities," Romano said Tuesday.

“While we believe in the due process of the law, the severity and the nature of this is disheartening,” Romano said.

In a press release sent to Republican Town Committee members on Sunday, Anderson’s campaign accused top party officials of ignoring the allegations.

“Instead of investigating the issues over the last three months, party leaders participated in cajoling, victim-shaming, and shunning Mr. Anderson, questioning his integrity,” according to the release. “It was Justin’s goal to deal with the allegations privately among leaders to protect the victim, however party leaders brought this out publicly to discredit Mr. Anderson.”

Anderson said he felt compelled to speak up "as a husband and a father."

"When you see domestic abuse, you can't ignore it," Anderson said.

It is unclear what will happen if Gilmer wins the primary. Thousands of absentee ballots have already been cast.

A spokesman for the secretary of the state said the office has not received formal notice of Gilmer's intent to quit the race.

"He's going to be on the ballot all day today," said Gabe Rosenberg, the spokesman. "It's too late to remove him on the ballot."

If Gilmer wins the nomination and then drops out, the party could renominate a candidate. But unless Gilmer formally notifies the secretary of the state’s office, he will remain on the November ballot if he wins the primary.

The 2nd District, which includes most of Eastern Connecticut, has been held by Democrat Joe Courtney since 2007 and is widely considered a safe seat, despite being among the most conservative of the state's five congressional districts.

Gilmer said Republicans need to continue fighting Courtney's "ultra-progressive agenda."

"While I must withdraw my name from the ballot at this time, I trust that our fight against Joe Courtney's radical agenda will live on in each one of you," wrote Gilmer, who could not be reached for comment.

“But ultimately, our movement — built on the tenets of good, old-fashioned Yankee conservatism — is too important to be sidetracked by the allegations facing me — allegations which I intend to fight,” Gilmer concluded.