After the 1969 Libya coup, he went on to occupy important post in the new government. During the early 1970s, he stood up for his principles and defended prisoners rights despite the risk. From 1972 to 1973, he served as foreign minister and later Libyan permanent representative to the UN from 1975 to 1980. He resigned in 1980 in opposition to Gaddafi's regime in protest against the policies of summary executions practiced by the Libyan government at the time through the so-called revolutionary committees.