Born and raised in Alor Setar, Kedah, he excelled at school and became a physician. He became active in the United Malays National Organisation (UMNO) before entering parliament in 1964. He served one term before losing his seat, subsequently falling out with Prime Minister Tunku Abdul Rahman and expelled from UMNO. When Abdul Rahman resigned, Mahathir re-entered UMNO and parliament, and was promoted to the Cabinet, where he served as Minister of Education from 1974 to 1978 and Minister of Trade and Industry from 1978 to 1981. He became Deputy Prime Minister in 1976. In 1981, he was sworn in as prime minister after his predecessor's resignation, Hussein Onn.