Columbia, South Carolina (CNN) -- The tumultuous and nasty race for the Republican gubernatorial nomination in South Carolina will continue for another two weeks after Nikki Haley narrowly avoided winning Tuesday's four-way GOP primary outright.
Haley cruised to a commanding win but fell just short of the 50 percent threshold needed to avoid a runoff election, scheduled for June 22.
Her opponent in the two-week sprint for the nomination will be Rep. Gresham Barrett, who finished in a distant second place and was dogged throughout the race by his vote for the Wall Street bailout in 2008.
Barrett's advisers denied rumors that he would drop out of the race and let Haley avoid a runoff. Barrett campaign manager Luke Byars said his candidate is "in it to win it."
Attorney General Henry McMaster finished in third place while Lt. Gov. Andre Bauer finished fourth.
State Sen. Vincent Sheheen captured the Democratic nomination on Tuesday.
Haley's dominant win marks a stunning turn of events for a candidate who was mired in fourth place just one month ago, but vaulted to the front of the race after a series of statewide television ads and a well-timed endorsement from Sarah Palin.
The campaign was defined in its final weeks as it devolved into a quagmire of particularly nasty attacks and rumor mongering -- even by South Carolina standards.
"You saw us push against the establishment, and push against the money and push against the power," Haley said at her election night celebration in Columbia, South Carolina. "And boy did they push back."
Two men claimed to have had an affair with Haley, who adamantly denied the allegations. Her opponents denied pushing rumors of the affairs, with Bauer going so far as to take a lie detector test to prove it.
To compound matters, a state lawmaker backing Bauer called Haley, who is of Sikh heritage, a "raghead." After an uproar by both state Republicans and Democrats, state Sen. Jake Knotts apologized.
"Over the last two weeks we said no to the dark side of politics," Haley told supporters.
Tuesday's results suggest that Haley not only survived the mudslinging -- she benefited from them. Haley became the focal point of the race and her support among Republican primary voters appeared to harden in the closing days of the race.
But South Carolina GOP chairwoman Karen Floyd predicted that the runoff battle between Haley and Barrett could be just as turbulent.
"I think that we are in for two weeks of very, very focused vetting," Floyd told CNN. "I think it's going to be rough and tumble. We are in for a real intense two weeks."