California hasn’t always been a lock for the Democratic presidential nominee. Republicans won the state in nearly every presidential election between 1952 and 1988. Ahead of an election that could see more blue in the Golden State than ever before , here’s a look at how Democrats gained, lost and won back California.

Margin of victory by county +10% Dem. 5-10% Dem. 0-5% Dem. Tie Third party 0-5% Rep. 5-10% Rep. +10% Rep. Democrat wins state Republican wins state

The Era of FDR Franklin D. Roosevelt handily captured California in all four of his victories, winning by a larger majority of the popular vote in 1936 than any candidate has since. His second term marked the last time Orange County voted for a Democrat. The New Deal led to higher employment rates and the creation of several of California’s most notable landmarks. Harry Truman became president after Roosevelt's death in his fourth term. When Truman ran for a full term in 1948, he won the state but saw several counties turn Republican — a preview of the changes to come.

Postwar boom The economy steadily grew after World War II and the electorate’s attention turned overseas to the Soviet Union and the expansion of Communism. Republicans nominated moderate candidates who who were strong anti-Communists, leading Dwight Eisenhower and Richard Nixon to win California (though Nixon lost the presidency to John F. Kennedy). The party’s momentum was halted by Barry Goldwater, whose views on communism and fiscal conservatism were deemed too extreme.

Nixon, California's native son Nixon, born in Yorba Linda, represented California in both the House and Senate before becoming vice president. He won his presidential campaign in 1968 after pledging to improve the economy and bring new leadership to the Vietnam War. He won reelection in a landslide against a liberal Democrat. After Nixon's 1974 resignation, Gerald Ford won California but lost the election.

Reagan revolution President Carter faced a tough road to reelection after a first term that saw oil crises, slow economic growth and the Iran hostage affair. Ronald Reagan, who as former governor was already popular in California, campaigned on a platform of returning optimism back to the country and easily won both campaigns. His popularity helped his successor, George H.W. Bush, win in 1988—the last time a Republican would carry California.

DEMOCRATS SURGE IN THE STATE California’s Latino and Asian populations boomed in the 1990s and the growing segment of voters were turned off by the Republican Party’s hard-line stance on immigration. After the party closely tied itself to Proposition 187, a controversial California ballot measure that denied public services to people in the country illegally, Republicans struggled to win back the state's immigrant population. Democratic candidates have won decisively in every election since 1992 by performing well in the most populous areas. Despite failing to win the presidency, Hillary Clinton won a higher percentage of votes than any candidate since Franklin D. Roosevelt.

How has your county voted over the years? Democrat wins county Republican wins county Third party wins county Year Winner Total vote (D) Total vote (R) Percent of vote (D) Percent of vote (R)

Update: This graphic has been updated to display corrected totals in 1936, and to reflect that Ross Perot, a third party candidate, won a majority of votes in Trinity County in 1996.