In the 1880 United States presidential election, California narrowly voted for the Democratic nominee, United States Army officer Winfield Hancock, over the Republican nominee, OhiorepresentativeJames A. Garfield. The 144-vote margin was the smallest in any statewide presidential election since Henry Clay won Maryland by only four votes in 1832, and as of 2017 it stands as by percentage of the vote the eleventh-closest statewide presidential election result on record – although California would later see even closer results in 1892 and 1912.[a] One elector cast a vote for Garfield.
This result constituted the first Democratic victory in California since 1856 when the Republican Party had only recently formed. The Democrats wouldn't carry the state again until 1892. The unexpected Democratic win was due almost entirely to the fact that Garfield was viewed as weaker than Hancock on the hot-bed issue of controlling immigration from China – which both major parties promised to do and which the California electorate was overwhelmingly in favor of.
As a result of Garfield's loss, he became the first Republican to win the presidency without carrying California. This would not occur again until 120 years later.