With Pakistan surrendering in the war, Yahya Khan was replaced by Zulfikar Ali Bhutto as president; the country worked towards promulgating its constitution and putting the country on the road to democracy. Democratic rule resumed from 1972 to 1977—an era of self-consciousness, intellectual leftism, nationalism, and nationwide reconstruction. In 1972 Pakistan embarked on an ambitious plan to develop its nuclear deterrence capability with the goal of preventing any foreign invasion; the country's first nuclear power plant was inaugurated in that same year. Accelerated in response to India's first nuclear test in 1974, this crash program was completed in 1979.