After moving to Bandung from his hometown Solok, West Sumatra for senior high school, Natsir studied Islamic doctrine extensively. His first articles were published in 1929, and during the 1930s he wrote for several Islamic-themed papers. He entered politics in the mid-1930s, rising through the ranks of Islamic parties. On 5 September 1950, he was chosen as prime minister, a term which he served until 26 April 1951. After his term as prime minister, he became increasingly vocal about Islam's role in Indonesia and was eventually arrested for doing so. Released in 1966 after the New Order government took power, Natsir continued to be critical of the government, eventually leading to him being banned from traveling.