COLUMBIA, S.C. (AP) — The Latest on reactions to the primary election results (all times local):

11 a.m.

House Speaker Paul Ryan says Rep. Mark Sanford's primary loss in South Carolina is "just what happens."

He spoke Wednesday after President Donald Trump congratulated himself for his Election Day tweet that endorsed Sanford's opponent, Rep. Katie Arrington.

Sanford's criticism of Trump as unworthy and culturally intolerant made him a target of dedicated Trump supporters. It was the latest example of how loyalty to Trump is becoming a key dynamic in the midterm elections.

Ryan, the Wisconsin Republican who is retiring after this year, said of the primary: "It was a very close election. Some of our members have lost primaries."

He added, "That's just what happens in contested primaries...This happens."

Sanford's loss to Arrington was the most dramatic development of Tuesday's contests across five states

___

7:20 a.m.

President Donald Trump is trumpeting the defeat of a South Carolina Republican congressman who has been critical of his administration.

Trump tweets Wednesday that his advisers didn't want him to get involved in the Republican primary, thinking Rep. Mark Sanford "would easily win."

But Trump says Rep. Katie Arrington "was such a good candidate, and Sanford was so bad, I had to give it a shot."

Arrington narrowly defeated Sanford after Trump tweeted on election day that Sanford had been unhelpful, adding, "He is better off in Argentina."

That was a reference to Sanford's surprise disappearance from the state as governor, which he later revealed was to continue his affair with an Argentine woman.

___

6:50 a.m.

President Donald Trump has congratulated his loyalist Corey Stewart for winning Virginia's Republican Senate primary. The president's tweet also calls Virginia's Democratic Sen. Tim Kaine a "total stiff," saying he's "weak on crime and borders, and wants to raise your taxes through the roof."

Trump's tweet just before 6 a.m. Wednesday also says Stewart has "a major chance of winning!"

Stewart is an outspoken defender of Confederate symbolism. He says he plans a "vicious" general election campaign against Kaine, who battled Trump as Hillary Clinton's vice presidential candidate and has a huge fundraising advantage.

__

2 a.m.

A second incumbent Republican congressman has lost his seat in a primary featuring intense divisions among the GOP in the Trump era.

Congressman Mark Sanford is best remembered nationally for a highly public extramarital affair with a woman in Argentina several years ago. In Tuesday's primary, he lost to state Representative Katie Arrington, who had campaigned against Sanford by branding him a "Never Trumper." The president himself weighed in by stoking memories of the affair, tweeting that Sanford was "better off in Argentina."

Four other states held primaries. In Virginia, a Republican known for his ardent defense of Confederate symbolism, Corey Stewart, won the Republican primary to face Democratic Sen. Tim Kaine. Stewart says he plans to wage a "vicious" campaign against Kaine, Hillary Clinton's running mate in 2016.