U.S. Sen. Thad Cochran, R-Miss., addresses supporters and volunteers at his runoff election victory party Tuesday, June 24, 2014, at the Mississippi Children’s Museum in Jackson, Miss. Cochran defeated state Sen. Chris McDaniel of Ellisville, in a primary runoff for the GOP nomination for senate. (AP Photo/Rogelio V. Solis)

U.S. Sen. Thad Cochran, R-Miss., addresses supporters and volunteers at his runoff election victory party Tuesday, June 24, 2014, at the Mississippi Children’s Museum in Jackson, Miss. Cochran defeated state Sen. Chris McDaniel of Ellisville, in a primary runoff for the GOP nomination for senate. (AP Photo/Rogelio V. Solis)

WASHINGTON (AP) â” The Washington establishment delivered a punch to the gut of the tea party movement Tuesday as Mississippi Republican Sen. Thad Cochran, a mainstream conservative with more than 40 years congressional experience, narrowly turned back a challenge from state Sen. Chris McDaniel.

Unsuccessful in earlier Republican primaries in Kentucky, Georgia and North Carolina, outside conservative organizations and tea party groups had invested millions in Mississippi in hopes of knocking out six-term Sen. Cochran. They fell short Tuesday night after a nasty, costly primary, and have few chances to reverse the trend in the remaining contests before November’s elections.

The results left the movement’s leaders fuming.

“Unfortunately in Mississippi, nefarious campaign tactics seem to have won the day over ideas and a bold conservative vision,” said Taylor Budowich, executive director of Tea Party Express. “We thank Senator Chris McDaniel for courageously standing up to the political machine. In politics, the righteous are not always victorious, but Americans across the country appreciate the values that his campaign was built upon.”

In another setback for the tea party, two-term Rep. James Lankford of Oklahoma won the GOP nomination in the race to succeed Sen. Tom Coburn, who is stepping down with two years left in his term. In the solidly Republican state, Lankford is all but assured of becoming the next senator. Part of the House GOP leadership, Lankford defeated T.W. Shannon, a member of the Chickasaw Nation and the state’s first black House speaker, who was backed by former vice presidential candidate Sarah Palin and Texas Sen. Ted Cruz, two stalwarts of the right.

The Republican establishment blames the tea party movement and outside groups for costing it Senate seats â” and majority control â” in 2010 and 2012. Leaders in Washington were determined to avoid the same fate this election cycle, when they have a legitimate shot at netting the six seats to control the Senate. Cochran’s win goes a long way to helping the GOP achieve its goal.

Earlier this month, McDaniel had beaten the veteran lawmaker in the initial primary round but had fallen short of the majority needed for nomination. In the three-week dash to the runoff, Cochran and his allies highlighted his seniority while McDaniel argued that Cochran was part of a blight of federal overspending.

In a last-ditch effort, Cochran reached out to traditionally Democratic voters â” blacks and union members â” who could cast ballots in the runoff. That possible factor in Cochran’s victory is sure to be cited by critics in days and weeks to come.

At the Cochran party, Ronny Barrett, a 56-year-old mechanic from Jackson, said that until the June 3 primary, he had always voted for Democrats, but he decided to support Cochran after following news coverage and talking to friends.

“Sen. Cochran has done a lot of things for the black community, and a lot of people in the black community might not know that,” said Barrett, who is black.

Cochran, a stalwart of the Senate Appropriations Committee, has funneled billions to his home state, one of the poorest in the nation, since he won a U.S. House seat in President Richard Nixon’s GOP wave of 1972 and then was elected to the Senate in 1978.

The Mississippi contest was the marquee race on a busy June primary day that included New York, Oklahoma, Colorado, Maryland and Utah.

In New York’s Harlem and upper Manhattan, 84-year-old Democratic Rep. Charles Rangel, a 22-term congressman and the third-most-senior member of the House, held a slight lead over state Sen. Adriano Espaillat, bidding to become the first Dominican-American member of Congress. The race was too close to call with an undetermined number of absentee ballots still to be counted. Two years ago, Rangel prevailed in the primary by fewer than 1,100 votes.

In Colorado, former Rep. Bob Beauprez won a crowded gubernatorial primary that included 2008 presidential candidate Tom Tancredo, an immigration opponent. That was welcome news to national Republicans who feared that Tancredo could be a drag on the GOP ticket in November. Beauprez will face Democratic Gov. John Hickenlooper.

In Maryland, Lt. Gov. Anthony Brown won the Democratic primary for governor as the state chose a successor to outgoing Democratic Gov. Martin O’Malley, who is considering a 2016 presidential bid. If elected in the Democratic-leaning state, Brown would make history as one of the few African-American governors; Massachusetts’ Deval Patrick is retiring.

In Mississippi, outside groups, from tea party organizations to the U.S. Chamber of Commerce, spent some $12 million on the GOP Senate runoff. Former Green Bay Packers quarterback â” and Gulfport, Mississippi, native â” Brett Favre called the 76-year-old Cochran a “proven and respected leader” in one Chamber ad.

In November, Cochran will face Democrat Travis Childers, a former congressman, in the heavily Republican state.