U.S. Sen. Thad Cochran, R-Mississippi, waves to supporters at the conclusion of his speech at a pre-election day rally at the Mississippi Agriculture and Forestry Museum in Jackson, Miss., on Monday, June 2, 2014. Sen. Cochran's contentious race against state Sen. Chris McDaniel, R-Ellisville, will be decided Tuesday as voters will head to the polls to cast their ballots in the state's Republican primary. (AP Photo/The Clarion-Ledger, Joe Ellis)  Sen. Thad Cochran (R-Miss.) at a rally on Monday. (AP Photo/The Clarion-Ledger, Joe Ellis)

Sen. Thad Cochran (R-Miss.) was officially forced into a runoff Wednesday against tea party challenger Chris McDaniel, setting off a three-week sprint to the finish in a nasty, expensive campaign that is perhaps the last best chance for conservative activists to replace a longtime Republican senator with one of its own in 2014.

The outcome of the GOP primary race was the latest complication for Cochran, who is at risk of becoming the first U.S. senator to be dislodged this year. Conservative groups have already spent more than $5 million against the senator and have vowed to keep up their intensity heading toward the June 24 election.

The Associated Press called the race a runoff nearly 24 hours after polls closed Tuesday.

Chris McDaniel promises a victory to a late night audience Tuesday July 3, 2014, at the Lake Terrace Convention Center in Hattiesburg, Miss. McDaniel and six-term Sen. Thad Cochran dueled inconclusively at close quarters in Mississippi's primary election Tuesday night. (AP Photo/George Clark) Chris McDaniel speaks to supporters Tuesday night. (AP Photo/George Clark)

With all precincts reporting, McDaniel outpaced Cochran 49.5 percent to 49 percent, with a third candidate finishing well behind the two. Because no candidate won a majority, the campaign will continue.

The more than $12 million battle has tested the might of two starkly different Republicans split along generational and ideological lines. Tuesday's result came as other tea party challengers have fizzled against more moderate Republican senators. The result of their struggles, some Republicans said, was a coalition of national tea party groups itching for a win.