Establishment-backed Rep. Todd C. Young easily won Tuesday’s GOP Senate primary to replace retiring Sen. Daniel Coats (R), delivering a critical win for anxious party leaders.

Young handily defeated Rep. Marlin A. Stutzman, who campaigned as a rabble-rousing outsider looking to shake up Washington and challenge party leaders. Young was ahead with more than 60 percent of the vote Tuesday night, with more than half of the precincts reporting.

Allies of Senate Majority Leader Mitch McConnell (R-Ky.) poured millions of dollars into backing Young to prove that mainstream Republicans can retain control of Congress in the year of Donald Trump. Trump won the Indiana Republican presidential primary with more than 50 percent of the vote, with more than 50 percent of precincts reporting.

Republican leaders know they can afford to lose only three Senate seats if they hope to retain control of the chamber next year. Young, a lawyer and former Marine, is expected to have a better shot at beating former congressman Baron P. Hill (D) in November.

“The last time Todd Young faced Baron Hill on the ballot, voters overwhelmingly elected Todd in an unmistakable rejection of Washington Democrats’ unpopular agenda. We look forward to a repeat performance,” said Sen. Roger Wicker (R-Miss.), National Republican Senatorial Committee chairman.

Neither Stutzman nor Young had been tested in a statewide race, but Young proved his ability to win undecided and independent voters when he defeated Hill in 2010, and Republicans are eager for a rematch.

For his part, Stutzman hails from a deeply conservative part of the state and had never faced a serious Democratic challenger.

Republicans typically don’t have to worry about  Indiana, which generally goes red on the statewide level. But many GOP elites were concerned that Stutzman’s hard-line politics would have left him vulnerable in a general election. They remember all-too-well the shocking ouster of incumbent Sen. Richard G. Lugar (R-Ind.) in 2012 by Richard Mourdock, who lost the general to now-Sen. Joe Donnelly (D).

Young and Stutzman bickered for months over who has the most conservative record. Polls leading up to the election, including a recent NBC-Wall Street Journal-Marist poll, showed Young ahead by 32 points with 56 percent support from likely GOP primary voters compared to 24 percent for Stutzman — with 19 percent still undecided.

Throughout the campaign, Stutzman, a three-term congressman from the northeast corner of Indiana, had little success capitalizing on Trump’s popularity in the state. Stutzman was pummeled in recent weeks over allegations that he misspent more than $2,000 in campaign funds on a family vacation to California and spent $170,000 to hire his brother-in-law as a fundraiser during previous congressional campaigns. The campaign has denied any wrongdoing.

Traditional establishment heavyweights such as the U.S. Chamber of Commerce and American Crossroads flooded the state with ads to boost Young’s profile.

The Senate Leadership Fund, a super PAC started by McConnell allies and associated with American Crossroads, was expected to spend $235,000 in broadcast and cable ads in the primary run-up and an additional $25,000 on targeted digital advertising.

“Todd Young is a true Hoosier conservative whose well-deserved victory tonight ensures that this Senate seat will stay in the Republican column. Rep. Young’s experience as a Marine will be an invaluable asset in the Senate as he continues his fight to keep America safe from terrorism,” said Senate Leadership Fund President and chief executive Steven Law.

Some GOP insiders said that the massive ad campaign could exceed $2 million by the end of the primary and was seen as a good investment. But there was no doubt that it was a risky choice in a year when well-funded presidential candidates such as Jeb Bush and Florida Sen. Marco Rubio dropped out when dollars didn’t translate to votes.

But national Republicans hoped their Indiana counterparts also wanted to avoid a 2012 repeat when Mourdock garnered national attention for saying pregnancy as a result of rape was what “God intended.”

Republicans worried that voters would reject another hard-line conservative, leaving the state with two Democratic senators for the first time since 1976.