The Nazis began in 1919 as the German Workers Party, later becoming the NSDAP. Hitler became leader in 1921 and established the brownshirts militia. In 1923, Hitler attempted to seize power in Munich but failed in the Beer Hall Putsch. Imprisoned, he wrote Mein Kampf outlining his ideology. Through the late 1920s, the Nazis reorganized and gained support by exploiting the German economy's decline during the Great Depression. By 1932 they were the largest party in Germany's legislature, and Hitler was appointed Chancellor in 1933.