President Donald Trump highlighted Republican Rep. Mark Sanford's extramarital affair Tuesday as he boosted the South Carolina congressman's challenger.

In a tweet sent only a couple hours before primary election polls close in the state, the president endorsed Sanford's opponent, Katie Arrington. Seizing on Arrington's attack line in the race, Trump contended the congressman "has been very unhelpful" to his agenda and "nothing but trouble."

"He is better off in Argentina," the president added. The sentence alludes to the former South Carolina governor's disappearance in 2009. While he claimed to be hiking the Appalachian Trail, he was really in the South American country visiting a woman with whom he was having an affair.

Trump tweet

A president campaigning against a sitting member of Congress from his own party is rare. Sanford's campaign did not immediately respond to a request to comment.

It is unclear how much of an effect Trump's endorsement could have on the South Carolina 1st District GOP primary, as polls close at 7 p.m. ET. The GOP primary winner in the Republican-leaning district will be favored in November's general election.

Allegiance to Trump has played an important role in both House and Senate primaries in red pockets of the country. State Rep. Katie Arrington has made supporting the president a centerpiece of her campaign.

"It's time to turn the page on the Mark Sanford era. It's time for a new Republican voice in Congress. It's time for a conservative who will work with President Trump, not against him," she said in a recent television ad.