Wahid was born in Jombang, East Java, in 1940. His grandfather started Indonesia's biggest Muslim organization, the Nahdlatul Ulama, or NU. His father was the first Indonesian minister of religious affairs. The family moved to Jakarta in 1944. In 1959 he went back to Jombang, where he became a teacher and later a school principal. In 1963 he won a scholarship to go to Egypt and study at al-Azhar University in Cairo. He later studied in Baghdad and in the Netherlands. He returned to Indonesia in 1971 and worked as a journalist.