Corrections and clarifications: An earlier version of this story misstated the impact of an affair on Mark Sanford's political career.
WASHINGTON – For Mark Sanford, the Republican Party looks a lot like the party of President Donald Trump.
The sitting Republican House member lost his primary race to state Rep. Katie Arrington, who campaigned as a Trump ally, after the president made a last-minute endorsement of Arrington. Sanford has been one of the few members to criticize the president, and GOP primary voters punished him for it, handing him his first electoral defeat.
Some folks who were not feeling the sting of defeat? Women, particularly Democratic women, who won primary elections across the country.
And the effects of Maine's new voting system was still to be determined. Hours after the polls closed, votes were still being tabulated.
Here are some takeaways from Tuesday's primaries in South Carolina, Maine, Virginia and Nevada.
It's Trump’s party
Just three hours before the polls were supposed to close in South Carolina, Trump inserted himself into an already tight race between Sanford and Arrington. Trump said he endorsed Arrington over his party's incumbent lawmaker because Sanford — who has never hesitated to criticize the president — was “very unhelpful” and “nothing but trouble.”
It was the first election loss for a politician who is no stranger to controversy. Sanford's political career was damaged in 2009 over an affair, but he won his House seat just a few years later. Arrington had been running as a Trump ally while highlighting Sanford's criticism of the president.
Sanford isn’t the only incumbent whose criticism of Trump hurt in the primary. Alabama Republican Rep. Martha Roby was forced into a runoff last week. She came under fierce fire in her GOP primary for withdrawing her endorsement of Trump in the 2016 presidential race after the "Access Hollywood" tape revealed Trump's boasts about grabbing women by the genitals. Roby's opponent, Bobby Bright, a one-time Democratic congressman, ran ads accusing Roby of turning “her back on President Trump when he needed her the most.”
On the flip side, support from the president was not enough to keep South Carolina Gov. Henry McMaster from a runoff after he failed to secure over 50 percent of the vote, but it did have him leading by a significant margin. McMaster — who was an early endorser of the president’s — has gotten Trump’s blessing via Twitter.
Women — especially Dems — keep winning
In almost every race where a woman ran in Virginia she won. Democratic women won their primaries in Virginia’s 7th and 10th Congressional Districts. Both districts are held by Republicans but are on Democrats radar for the fall, with the 10th being one of their top targets. Former CIA officer Abigail Spanberger won Democrats’ nomination for Virginia’s 7th District and state Sen. Jennifer Wexton beat a crowded field for the 10th.
Republican Shion Fenty, an administrative assistant, was the rare Virginia woman to lose her primary to a man. She lost to evangelical pastor Ryan McAdams for the GOP nomination for Virginia’s 4th Congressional District.
In Nevada, Rep. Jacky Rosen easily secured the Democratic nomination for Senate. Susie Lee, an education advocate, won her crowded primary for the 3rd Congressional District by a majority of the vote.
But it wasn't just Democratic women who won. Arrington beat incumbent Sanford for the GOP nomination in South Carolina.
Tuesday's results weren't the first example of Democratic women succeeding this primary season. From Pennsylvania to New Mexico and Kentucky to Nebraska, female candidates, particularly Democrats, have been winning their primaries.
Dave Wasserman, the editor of the nonpartisan Cook Political Report said that women were nominated as the Democratic candidate in the general election almost half the time, compared to just a sixth on the GOP side.
New voting systems leave much to be determined
Like we found in California, there's still much to be determined about new voting systems. Maine voters tried Instant Runoff Voting for the first time Tuesday, and at the same time they voted on whether to keep the system.
Under Instant Runoff Voting, first-choice votes are counted and, if no candidate gets over 50 percent, the candidate with the lowest number of votes is removed from the race. Those who gave that candidate their first-choice pick have their votes redirected to their second choice. The process is repeated until a candidate has a majority of the vote and is declared the winner.
Mainers voted in 2016 to start using the service. Voters went back to the polls Tuesday to determine if they would keep using it. They rejected a legislative delay of ranked-choice voting, meaning the system will be used in federal elections in November in the state.
The Associated Press called Maine's Republican gubernatorial primary for businessman Shawn Moody, but the Democratic primary wasn't being called because no candidate was close to a majority.
Because no candidate could be declared the outright winner, more tabulations are required next week under the state's new ranked-choice voting system.
It's a tough year to be a GOP incumbent
Sanford's loss Tuesday may have been one of the most high profile, but he joins a line of his Republican House colleagues who have lost their primary — like Rep. Robert Pittenger — or bid for higher office this cycle.
Two House GOP members in Indiana, Reps. Luke Messer and Todd Rokita, ran for their party's nomination for the Senate — both lost to wealthy businessmen. West Virginia Rep. Evan Jenkins lost his bid to be the Republican Senate nominee to the state's attorney general. Rep. Raul Labrador, a Freedom Caucus colleague of Sanford's, lost his campaign to be the GOP nominee for Idaho governor.
There have been a couple of bright spots for GOP incumbents: Rep. Lou Barletta, a Trump ally, will take on Democratic Sen. Bob Casey in November, and Rep. Kristi Noem won her party's nomination for South Dakota governor.