Democrat Gavin Newsom won his primary for California governor. But the contest for the US House of Representatives is the spotlight in the blue state as Democrats look to blunt Trump's presidency by taking control of the House.
Holding hopes of a 'blue wave' in November, Democrats fought to shape the political battlefield in primaries across eight states, none more important than California where Republicans avoided an embarrassing setback in the race for governor.
Lt. Governor Gavin Newson, a Democrat, easily advanced to the general election, with business executive John Cox, Republican, coming in second.
Cox's strong finish put to rest GOP fears that no Republican would qualify for the deeply Democratic state's top office this fall and the party's other candidates would suffer from a resulting lack of voter interest on election day.
The governor's race was one of many drawing attention to California, a state not accustomed to being a national political battleground. But its handful of competitive races for the House of Representatives — largely in Southern California — have made it hotly contested territory in the fight over control of the House, drawing big money and the spotlight on the biggest primary night of midterms, and the first real test of the political landscape going into the November elections.
Voters in seven other states also went to the polls on Tuesday. And it was a big night for women, as female candidates for governor advanced. Democratic incumbents, including California's Senator Dianne Feinstein, fared well, fending off challenges from the left.
Neither party immediately appeared to suffer major setbacks. Yet the winners and losers in California's most competitive races could take days to sort out given the state's unique election laws.
No state offers Democrats more opportunities to gain House seats this fall than California, where more than a half dozen Republican-held seats may be in play. Democrats need to pick up 23 seats nationwide to retake the House.
Feinstein won her party's nomination for another term, as widely expected. It was still unclear whether a Republican would earn enough votes to oppose her on California's November ballot.
In another midterm battleground nearly 5,000 kilometres (3,000 miles) away, former federal prosecutor and Navy pilot Mikie Sherrill bested a field of Democratic rivals in the race to replace retiring New Jersey Republican Representative Rodney Frelinghuysen. The favourite of Washington Democrats will take on GOP Assemblyman Jay Webber in one of several New Jersey races Democrats view as possible pickups.
Much of the day's drama focused on women, who fought to make history in some cases and to avoid disaster in others.
In Alabama, four-term Republican Representative Martha Roby was forced into a runoff election next month after failing to win 50 percent of her party's vote. She will face former Democratic Representative Bobby Bright in Alabama's conservative 2nd district — where loyalty to Republican US President Donald Trump has been a central issue.
Roby was the first member of Congress to withdraw her endorsement of the Republican president in 2016 after he was caught on video bragging about grabbing women's genitals.
In New Mexico, Democratic Representative Michelle Lujan Grisham won her party's nomination in the race to succeed outgoing Republican Governor Susana Martinez. If Grisham wins, she'll be the state's second Latino state executive.
Alabama Governor Kay Ivey fended off three GOP challengers, while South Dakota Representative Kristi Noem became the first female nominee for governor in her state.
In Iowa, 28-year-old Democratic state Representative Abby Finkenauer was trying to become the youngest woman to serve in Congress.
And in New Mexico, former state Democratic Party Chairwoman Debra Haaland, a tribal member of Laguna Pueblo, won her primary and could become the first Native American woman in Congress if she wins this fall.
Haaland said in her primary victory statement, "Donald Trump and the billionaire class should consider this victory a warning shot: the blue wave is coming."
Mississippi Republican Senator Roger Wicker won his primary contest as did New Jersey Senator Bob Menendez, a Democrat who faced federal bribery charges last year. The jury deadlocked, but Republicans hope to use Menendez's legal troubles to tar other Democrats like Sherrill across the state.
Republican businessman Bob Hugin claimed the Republican nomination to face Menendez this fall.
Trump for Cox
Recognising the high stakes in California, Trump sought to energise his supporters in a series of tweets praising his preferred candidates.
"In High Tax, High Crime California, be sure to get out and vote for Republican John Cox for Governor. He will make a BIG difference!" Trump tweeted.
Yet frightening scenarios existed for both parties.
Because of California's unusual primary system, all candidates appear on a single primary ballot, with the top two vote-getters regardless of party advancing to the November election. That allows the possibility of two candidates qualifying from the same party — and neither from the other.
National Democrats spent more than $7 million trying to curb and repair the damage inflicted by Democrats attacking each other in districts opened by retiring Republican Representatives Ed Royce and Darrell Issa, and the district where Republican Dana Rohrabacher is facing challenges from the left and the right.
In two of the three Southern California districts, Democrats were coming in second place behind Republicans, but the races were too close to call early on Wednesday, leaving Democrats at risk of being locked out. In another, Issa's district, Republican Diane Harkey was leading in early returns, as two Democrats vied for the second slot.
Republican Representative Mimi Walters easily advanced to the November election in her Orange County district that has been targeted by Democrats. The second spot remained up for grabs.
And to the north, House intelligence committee chairman Devin Nunes, a Republican, qualified for the general election ballot as well. Nunes is a polarising figure in national politics given his support for Trump in one of the many investigations into Russian meddling in the 2016 election.
Trump will not be on the ballot this year. But he was on the minds of many voters.
Francine Karuntzos, a 57-year-old retiree from Huntington Beach, California, said she has deep concerns about the Republican president — particularly his recent declaration that he could pardon himself. She said she isn't a member of a political party, but she voted Democratic on Tuesday.
"I'm really, really worried about our Constitution being ruined by this presidency," Karuntzos said after casting her ballot at a local community centre.
It was a different story in Mississippi, where 66-year-old Gladys Cruz wasn't sure which Republican she would support in the state's Senate primary, but she wanted whoever won to firmly support Trump.
The president "touches my heart," she said.
A key Senate race took shape in the heart of Trump country as well.
Montana Republicans were picking a candidate to take on Democratic Senator Jon Tester, one of the most vulnerable senators in the nation. State Auditor Matt Rosendale won the GOP nomination.