In 1979, Ouyahia joined the Ministry of Foreign Affairs and was assigned to the African affairs department. In 1980 he was named as an advisor for foreign affairs to the Ambassador of Algeria in Ivory Coast, where he served until 1982. In 1982 he was assigned as a foreign affairs advisor to the head of the Permanent Mission of Algeria at the United Nations headquarters in New York. In 1988 Ouyahia became the general director of the African department of the foreign affairs ministry. From 1988 to 1989 Ouyahia was co-representative to the United Nations Security Council. He was an advisor to the Minister of Foreign Affairs from 1990 to 1991.