In the aftermath of the Portuguese military coup on April 25, 1974, Rui returned to Angola to serve as the MPLA Minister of Information in the transitional government established by the Alvor Agreement. He then served as Angola's first representative to the Organization of African Unity and the United Nations. He also directed the MPLA's Department of Revolutionary Orientation and Department of Foreign Affairs. He wrote the lyrics of Angola's first national anthem, "Angola Avante!", the Angolan version of "The Internationale".