Alabama joined the Union in December 1819 and participated in all elections from 1820 on, except 1864 (due to its secession). Like most southern states, Alabama was a Democratic stronghold from Reconstruction through the 1950s. Southern Democrats were always more conservative than their increasingly liberal Northern brethren, which led to a period during which they put slates of unpledged electors on the ballot. This dissension in the party generally didn’t impact the final results. However, in 1960, six of the 11 Alabama electors cast their votes for Harry F. Byrd, despite John F. Kennedy winning the state’s popular vote.
Alabama largely abandoned the Democrats during the 1960s. The initial shift was largely in response to white conservative voter uneasiness with the civil rights legislation that was passed in the mid-1960s, which was effectively exploited by the Republicans "southern strategy." Republican nominees have won the state by over 20 points since 2004, including Donald Trump's nearly 28% margin in 2016. Alabama has had nine electoral votes since 1972; that may drop to eight after the 2020 election.