Updated

South Carolina Gov. Henry McMaster was projected to win Tuesday's Republican gubernatorial runoff election, avoiding what would have been a humiliating defeat to a political outsider.

With 95 percent of precincts reporting, McMaster led self-made millionaire John Warren 53 percent to 47 percent -- a difference of more than 18,000 votes out of more than 321,000 cast.

McMaster was forced into the runoff against Warren after he failed to reach 50 percent of the vote in the June 12 primary. The primary's third and fourth-place finishers -- attorney Catherine Templeton and Lt. Gov. Kevin Bryant -- both endorsed Warren, adding a layer of uncertainty to the vote.

On Monday, President Trump attempted to boost McMaster at a rally in West Columbia, S.C., telling the crowd, "Henry was for me from the beginning. There was nobody else," before commanding them to "get your asses out tomorrow and vote."

On Twitter Tuesday evening, Trump congratulated McMaster on his "BIG election win," adding "South Carolina loves you."

McMaster, who is seeking a first full term as governor, is set to face Democratic state Rep. James Smith in November.

McMaster served as lieutenant governor under Nikki Haley for two years before ascending to the top office in January 2017, when Haley became Trump's ambassador to the United Nations.

South Carolina was one of four states holding gubernatorial primaries or runoff elections Tuesday, along with Colorado, Maryland and Oklahoma.

In Maryland, NAACP President Ben Jealous was projected to defeat six other Democratic candidates for the right to face popular incumbent GOP Gov. Larry Hogan in November. An eighth Democratic candidate, Baltimore County Executive Kevin Kamenetz, received nearly 14,000 votes despite his sudden death last month. Kamenetz's running mate, Valerie Ervin, initially announced her candidacy in his place, but withdrew earlier this month.

Jealous had been backed by members of the Democratic party's left wing, including Sens. Bernie Sanders, Cory Booker and Kamala Harris. Baker, the top elected official in one of the nation's most affluent African-American-majority counties, was endorsed by former Maryland Gov. Martin O'Malley and current Democratic Sen. Chris Van Hollen.

In Oklahoma, ten Republicans were seeking to replace term-limited Gov. Mary Fallin. Political newcomer and national mortgage company founder Kevin Stitt shook up the race by raising $4.2 million ahead of the primary to outpace all candidates.

Other contenders include two-term Lt. Gov. Todd Lamb, a former state senator and U.S. Secret Service agent, and ex-Oklahoma City Mayor Mick Cornett, who helped oversee a revitalization of the state's capital city that included landing an NBA basketball team.

Democratic voters were projected to nominate former four-term state Attorney General Drew Edmondson as their candidate over ex-state Sen. Connie Johnson, the party's nominee for U.S. Senate in 2014.

In Colorado, state Treasurer Walker Stapleton, a second cousin of former President George W. Bush and former Florida Gov. Jeb Bush was projected to win the Republican gubernatorial nomination to replace term-limited Democrat John Hickenlooper. Stapleton easily defeated three other candidates: former state Rep. Victor Mitchell, who invested nearly $5 million in his own campaign; former Parker mayor Greg Lopez; and investment banker Doug Robinson, a first-time candidate who is also a nephew of 2012 Republican presidential nominee Mitt Romney.

In the Democratic race, five-term U.S. Rep. Jared Polis was projected to defeat former state Treasurer Cary Kennedy, Lt. Gov. Donna Lynne and former state Sen. Mike Johnston.

The Associated Press contributed to this report.