With most precincts reporting and an unknown number of mail-in and provisional ballots yet to be counted, unofficial results showed McDaniel with a slight lead Wednesday over Cochran in the three-way race. Neither McDaniel, a 41-year-old state senator, nor Cochran received a majority of the vote, which would be needed to avoid a runoff in three weeks.

Tom Carey, a real estate agent who ran a low-budget campaign, drew a small share of the primary vote and was eliminated from the race.

The Republican nominee will face Democrat Travis Childers and the Reform Party’s Shawn O’Hara in the Nov. 4 general election.

Third-party groups spent about $8.4 million in the primary, mostly on TV ads. Cochran’s campaign spent $3 million and McDaniel’s spent $1 million. McDaniel also received support from tea party stars, including Sarah Palin, the 2008 Republican vice presidential nominee, and former Pennsylvania Sen. Rick Santorum.

Cochran, 76, has been praised by top Republicans for bringing billions of dollars to Mississippi since he was first elected to the Senate in 1978.

The Republican contest took a bizarre turn in mid-May when four McDaniel supporters were arrested in what Madison police said was a plot to photograph Cochran’s wife on Easter Sunday in the nursing home where she has lived the past 13 years with dementia. Investigators said an image of Rose Cochran appeared in an anti-Cochran video that was briefly posted online April 26.

McDaniel has called the incident reprehensible and said he had nothing to do with it.

Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.