Updated

Incumbent Republican South Carolina Rep. Mark Sanford, a frequent Trump critic who the president lambasted earlier in the day as "nothing but trouble" and "very unhelpful," was ousted in Tuesday night's primary by state Rep. Katie Arrington.

On a key primary night with elections also held in Maine, Virginia, Nevada and North Dakota, the results in South Carolina were an unmistakably positive referendum on President Trump's tenure.

Arrington's shock win was also a dramatic rebuke of Sanford's heated "Never Trump"-style rhetoric and scandal-pocked career. It signaled that the president's base in the state remains solidly behind him ahead of November's midterm elections, despite withering criticism from both inside and outside the Republican party.

State Rep. Katie Arrington, a relative political newcomer who secured Trump's backing, repeatedly bashed Sanford for deriding the president and even ran advertisements featuring video clips of Sanford's Trump criticisms.

ALSO ON TUESDAY: PRO-TRUMP FIREBRAND WINS IN VIRGINIA SENATE PRIMARY

73df5c53-

Mark Sanford, a frequent Trump critic, went head-to-head in Tuesday's South Carolina primary with Trump backer Katie Arrington, a relative political newcomer. (Sanford state portrait, Arrington campaign photo)

Earlier Tuesday, as the ballots were being counted, Sanford acknowledged in an interview that his criticisms of Trump had hurt him in the primary.

“Well I think it has probably hurt me in this race," he said. "But again, there are no free lunches in life.  I think there are times I have had to oppose the president because of stands I have had for a long time."

The coastal 1st Congressional District is Republican-leaning, but contains sizable liberal pockets such as Charleston County, which went for Hillary Clinton in 2016.

Sanford has warned that Trump's steel and aluminum tariffs will be "disastrous," called the president intolerant and untrustworthy, and even appeared to blame him for the shooting at a Republican congressional baseball practice last year.

"I would argue that the president has unleashed — it's partially, again, not in any way totally — but partially to blame for demons that have been unleashed," Sanford said, after gunfire from a disaffected progressive loner nearly took the life of Majority Whip Steve Scalise, R-La.

Even before Trump took office, Sanford said the billionaire businessman should “just shut up” and “quit responding” to anyone critical of him on a personal or professional level.

Sanford served as governor of South Carolina from 2003 to 2011. In June 2009, Sanford disappeared from public view for six days and later claimed that he had been hiking on the Appalachian Trail.

He later admitted that he had in fact traveled to Argentina to meet a woman with whom he was having an extramarital affair.

But he staged a political comeback in 2013, winning the House seat in the district he had earlier represented for six years.

As voters headed to the polls Tuesday, Trump reminded them of Sanford's rhetoric, as well as the affair.

TRUMP MOCKS 'VERY UNHELPFUL' SANFORD, SAYS HE'S 'BETTER OFF IN ARGENTINA'

"I fully endorse Katie Arrington for Congress in SC, a state I love," tweeted Trump, who was traveling aboard Air Force One on the way back from his historic one-on-one meeting with North Korean leader Kim Jong Un. "She is tough on crime and will continue our fight to lower taxes. VOTE Katie!"

By contrast, Trump said that Sanford "has been very unhelpful to me in my campaign to [Make America Great Again]. He is MIA and nothing but trouble. He is better off in Argentina."

Other key races in NV, VA, and SC

Voters in Virginia also handed a big win Tuesday to pro-Trump Senate candidate Corey Stewart, the firebrand who has vowed to wage a "vicious" and "ruthless" fight against incumbent Sen. Tim Kaine.

Stewart said he plans to campaign like Trump and appeal to blue collar voters.

460d1d85-rgrg

Corey Stewart, Republican candidate for U.S. Senate and Chairman of Prince William County Board, addresses his supporters at the Electric Palm restaurant on election night (Washington Post via AP)

Chants of "lock her up" rang out at Stewart's victory speech Tuesday night.

TRUMP-BACKED CANDIDATE WINS IN NEVADA GUBERNATORIAL PRIMARY

Also in Virginia, voters decided that state Sen. Jennifer Wexton will take on vulnerable Republican Rep. Barbara Comstock in November in the northern Virginia congressional district. Wexton, who won a six-way primary, routed her well-funded competition in a race called early in the evening.

Comstock fought off a challenge from Shak Hill, who attacked the two-term incumbent as insufficiently conservative and weak in her support of President Donald Trump.

Barbara Comstock is one of the GOP's more vulnerable representatives in Congress; she will face state Sen. Jennifer Wexton in November. (AP Photo/Alex Brandon)

Comstock's district is considered a prime target for Democrats as they hope to retake the House in November.

Voters in Virginia also decided that former CIA officer Abigail Spanberger will face hard-right conservative Representative Dave Brat in November. Hillary Clinton carried Comstock's district by nearly ten points in 2016, and Trump's win in Brat's district was relatively narrow.

Meanwhile, Archie Parnell has won the Democratic nomination in a South Carolina congressional district despite revelations from a divorce filing last month that he beat his wife more than 40 years ago.Parnell's win sets up a rematch with U.S. Rep. Ralph Norman. Parnell lost by just 3 percentage points in a special election last year.

In Nevada, Trump-backed candidate Danny Tarkanian, the son of legendary UNLV basketball coach Jerry Tarkanian, defeated Scott Hammond and television reporter Michelle Mortensen.

Tarkanian, a businessman, had been running in the primary against GOP Sen. Dean Heller, when Trump reached out and asked him to switch races so that Heller could run without intra-party opposition.

Elsewhere in Nevada, Sharron Angle, the conservative who once ominously threatened to "take out" then-Sen. Harry Reid, lost her race against Rep. Mark Amodei.

The Associated Press and Fox News' Brooke Singman contributed to this report.