Update: Gavin Newsom, a Democrat, and Jon Cox, a Republican, emerged from a crowded field in the governor’s race in California to advance to the general election, according to The Associated Press, as did Senator Dianne Feinstein, a Democrat, in the Senate race. In key House races, Democrats seemed poised to avoid being shut out of the November balloting under the state’s so-called “top-two” primary system. Read more about the primary night in California, and about races from New Jersey to Montana.

LOS ANGELES — The votes in a big election day in California have been cast, and the country is eagerly awaiting the results. Key battles include seven Republican-held congressional seats Democrats hope to flip in the fall and a race to succeed Jerry Brown as governor.

All of this has been complicated by California’s unconventional election system: The top two finishers in Tuesday’s nonpartisan, open primary will face each other in November. And that is causing headaches for both parties.

Here’s how to get up to speed:

• Need a primer to understand the stakes of the California races? Start here. And here’s an explanation of how the state’s unusual primary system works.