Republican Rep. Joe Heck and former Nevada Attorney General Catherine Cortez Masto breezed through their primaries Tuesday to set up a pivotal U.S. Senate contest, while state Sen. Ruben Kihuen scored a solid win in a competitive Democratic congressional primary and businessman Danny Tarkanian bested a more moderate state senator in a bitter Republican House contest.

The wins on Tuesday cap a high-spending primary season and end two heated House races that attracted big names -- and dollars -- from the outside. In Tarkanian's 3rd Congressional District race, a dark money group called Ending Spending dumped $1.6 million into last-minute ads attacking him and promoting state Sen. Michael Roberson.

"When they came out with (the commercials), I was concerned that maybe we would lose support," Tarkanian said in an interview after his win. "I've got to thank the voters of CD3 for not believing that."

Roberson held the top-ranking post in the state senate last year and helped shepherd a $1.4 billion, governor-backed tax package through the Legislature that dogged him during the congressional campaign. He congratulated Tarkanian on a hard-fought race.

"I look forward to continuing my work as Senate Majority Leader and working to maintain Republican control of the state Senate in November," Roberson said in a statement.

Tarkanian, who made several unsuccessful bids for office in the past, will now face Democrat Jacky Rosen, a synagogue leader endorsed by Sen. Harry Reid. Rosen beat attorney Jesse Sbaih in the Democratic primary in the southern Nevada district, which is split nearly evenly between Democrats and Republicans.

"I felt confident, but it's a bigger margin than I thought. We were out there and able to get our message out," said Rosen, who later issued a statement criticizing Tarkanian as "ultra-conservative and "an enthusiastic supporter of Donald Trump."

In the 4th Congressional District race that includes North Las Vegas and rural central Nevada, Kihuen pulled far ahead of former Assemblywoman Lucy Flores and philanthropist Susie Lee. The primary was competitive and all candidates raised comparable funds, but Kihuen had backing from Reid and President Bill Clinton, and the hospitality workers of the Culinary Union mobilized a massive ground effort to round up the vote.

In a statement, Kihuen thanked the powerful union "for believing in this campaign and working day in and day out in the hot sun and in the pouring rain to get our message out to the voters."

He'll face incumbent Republican Rep. Cresent Hardy, who won an easy primary but has an uphill general election battle in a district that leans solidly Democratic.

Flores was unable to pull out a win even though Democratic presidential candidate Bernie Sanders sent wildly successful fundraising pitches on her behalf.

"We did everything we possibly could," said Flores campaign manager Tony Valdovinos. "Ultimately, low turnout seemed to hurt us the most."

Lee's campaign manager, Jonathan Pattillo, congratulated Kihuen and said Lee would support him in spite of the difficult loss.

"We feel we ran a very strong campaign that ran a strong message," Pattillo said.

   The Senate race that now belongs to Heck and Cortez Masto turned out as expected.

   Cortez Masto easily defeated a trio of little-known opponents, and Heck scored a comfortable win against conservative activist Sharron Angle in the Nevada primary. They'll compete for the seat being vacated by retiring Democratic Senate leader Harry Reid.

   "It's always humbling to get the support of the voters," Heck said by phone from Washington D.C. on Tuesday night, where he said he was reading bills to prepare for Wednesday's work in Congress.

   While Trump's presence could sway his election, Heck, who endorses the presumptive GOP nominee for president, said he's focused on his own race: "We're going to run our campaign according to the plan we've laid out."

   Masto issued a prepared statement after her victory, saying it sets up a race between two distinct ideologies.

   "I am confident that this November voters will reject Trump and Congressman Heck's reckless agenda and elect me as our next Senator," she said.

   In other races, incumbent Democratic Rep. Dina Titus scored an easy win in her heavily Democratic Las Vegas district. Republican Rep. Mark Amodei didn't have any primary opponents in his northern Nevada district.

   Voters weighed in on numerous legislative races, including Republican contests that have exposed deep rifts between the party's moderate and more conservative wings.

   Republican incumbents who supported Sandoval's tax package mostly survived challenges from anti-tax purists, although several lost their bid for re-election.

   Nevada Secretary of State Barbara Cegavske said she expected turnout for the primary would be on par with 2014, when 19 percent of voters turned out. Nevada has 1.3 million active voters.