Jim Brulte, the chairman of the California Republican Party, said that he expected the disparity to increase even more in the months ahead because of the competitive Democratic primary, while hopes for a contested Republican primary fizzled after Donald J. Trump all but locked up the nomination.

“California is a state that, all things being equal, wants to vote Democrat,” Mr. Brulte said. “We are still adding Republican registration statewide, but the statewide Republican registration is being dwarfed by the Democratic registration increase.”

The divergent fortunes of state and national Democrats go beyond voter registration. California Democrats have a bench of younger candidates waiting to step up as its older leaders — Mr. Brown, 78; and Senators Barbara L. Boxer, 75; and Dianne Feinstein, 82 — approach retirement. By contrast, the choice of Mrs. Clinton, 68, and Mr. Sanders, 74, is a reminder of the absence of fresh players prepared to take the national field.

Given the Democratic dominance here, it is easy to forget that Ronald Reagan served two terms as governor, and that Richard M. Nixon was born in Orange County, an area that was once an emblem of conservatism but is becoming increasingly Democratic. Republicans won every presidential election here from 1952 to 1988, with the exception of Lyndon B. Johnson in 1964 after the assassination of John F. Kennedy. Bill Clinton put the state into the Democratic presidential column in 1992, and it has been there ever since.

The Democrats’ more recent success in the state is in part the result of good fortune. California has been going through a period of prosperity, and in recent years Mr. Brown has been spared the need to impose politically contentious spending cuts.

It is also demographic. In 1994, the state’s Republican governor, Pete Wilson, championed a voter initiative to deny social services to illegal immigrants. The initiative passed but was thrown out in court. It left a political legacy that has hurt the Republican Party to this day: Over the past 12 years, Hispanics have grown into the largest ethnic group in the state, making up 39 percent of the population.