In 1934, a year after attending a congress of Muhammadiyah in Semarang, he was made a permanent member of the Council of Muhammadiyah Council for the region Central Sumatra. Muhammadiyah increasingly uphill career when he moved to Medan. In 1942, along with the fall of the Dutch East Indies to the Japanese colonial power, Hamka was elected as leader of East Sumatra Muhammadiyah to replace H. Mohammad Said. But in December 1945, he decided to return to the Minangkabau and the release position. The following year, he was elected Chairman of the Assembly of West Sumatra Muhammadiyah leaders replace SY Sutan Mangkuto. This position he embraces until 1949. In 1953, he was elected as the leader of the centr Muhammadyiah Muhammadiyah Congress to-32 at Purwokerto. Since then, he has always chosen the Muhammadiyah Congress further, until in 1971 he pleaded not elected because he was senile. However, he was still appointed as an adviser to the central leadership of Muhammadiyah until the end. In 1973, he testified in support of Vivian Rubiyanti Iskandar's petition before the West Jakarta District Court for legal recognition of her gender, saying that "[her desire to transition] does not run contrary to Allah's law, but in keeping with the teachings of Islam, which holds good will to all in high esteem". Hamka died on the 24th July 1981, and his remains were interred at Tanah Kusir Public Cemetery. A prolific writer, apart from his magnum opus, the thirty-volumes Qur'anic commentary called "Tafsir Al-Azhar", he was known to have written "over 100 books, ranging from philosophy, politics, Minangkabau adat, history and biography, Islamic doctrine, ethics, mysticism, tafsir, and fiction."