HATTIESBURG Miss. (Reuters) – Veteran U.S. Senator Thad Cochran of Mississippi narrowly defeated challenger Chris McDaniel on Tuesday in a high-profile runoff election that pitted the Republican party’s old guard against its anti-establishment Tea Party movement.

The bitterly-fought Mississippi Republican Senate primary election overshadowed other primary contests across the country. It was seen as a multimillion-dollar referendum on the direction of the party as it tries to win control of the U.S. Senate in the November congressional elections.

Cochran, 78, has steered hundreds of billions of federal dollars to his impoverished state over a four-decade career in Congress, and courthouses and research centers throughout the state bear his name.

McDaniel argued that Cochran’s nuts-and-bolts approach is out of step with voters in his deeply conservative state and promised to take a more confrontational approach to President Barack Obama and his Democratic allies in Washington.

Cochran won in part thanks to an unusual strategy of appealing to the state’s heavily Democratic African-American voters, who were able to vote in the runoff as long as they had not voted in the June 4 Democratic primary.

It was the latest battle in a months-long primary season that has pitted the party’s business-friendly wing against Tea Party groups that have pushed to slash federal spending.

Cochran edged McDaniel by fewer than 7,000 votes out of more than 370,000 cast – a dramatic increase over the 313,000 votes cast in the earlier contest. “What we have tonight is a consensus for more and better jobs for Mississippi workers,” Cochran told supporters. In a defiant speech, McDaniel did not concede the race and hinted at possible legal action. “Before this race ends, we have to be absolutely certain that the Republican primary was won by Republican voters,” McDaniel said.

Tea Party groups argued that Republicans should not rely on Democratic voters and federal dollars to win elections.

“I think the GOP establishment just died tonight because it won’t be winning a lot of national elections using this model,” said Matt Kibbe of FreedomWorks, a conservative group that campaigned for McDaniel.

Business groups like the U.S. Chamber of Commerce spent $4 million on Cochran’s behalf, while small-government groups spent $7 million backing McDaniel.

TIGHT RUNOFF

Neither candidate won more than 50 percent of the vote in the June 4 primary, prompting a runoff election that drew millions of dollars in outside spending.

Cochran argued that McDaniel would not be able to secure as many resources for a state that relies on federal dollars for nearly half of its state budget.

Cochran is strongly favored to defeat Democrat Travis Childers in the Nov. 4 election. Republicans need to pick up six seats to win control of the 100-seat U.S. Senate, which would give them greater leverage to oppose Obama’s agenda during his remaining two years in the White House.

Business groups have helped several high-profile Republican incumbents beat back Tea Party challengers this year, but the surprise defeat of House Republican Leader Eric Cantor by a little-known candidate two weeks ago showed that clout in Washington is no guarantee of victory back home.

“This has been a frustrating night for conservative insurgent forces. There has been a lot of money spent and not much in the way of results to show for it,” said Kyle Kondik of the University of Virginia’s Center for Politics.

Elsewhere in the country, Lieutenant Gov. Anthony Brown moved closer to becoming the third African-American governor in U.S. history after he easily won a Maryland Democratic primary contest. He is favored to win the November election in a state where Democratic voters outnumber Republicans by more than 2 to 1. In Oklahoma, Representative James Lankford defeated former state House Speaker T.W. Shannon in a Republican Senate primary. He is expected to defeat his Democratic opponent in November. In Colorado, former Republican Representative Bob Beauprez will face incumbent Democratic Gov. John Hickenlooper after defeating conservative rivals in the Republican primary.