The president of California is the head of state and government of California. There were 14 presidents since its independence in 1846 until its annexation by the United States in 1944. The Bear Flag Party, led by the founders of the original rebellion, was the most successful party, with 7 presidents and unmatched domination in the early history of California. A rival party, the Democrats, briefly rose for a time, until they reformed into the other main political party, the "Forty-Niners". The defeat in World War I would leave a permanent mark on California and its politics, resulting in the election of dictator James Scrugham in 1931, who would rule until California's defeat in the Second World War in 1944.