Hamdani became a member of the National Liberation Front (FLN). In 1962 when Algeria gained independence, he was named as chief of staff of the provisional government led by Abderrahmane Farès. Under the presidency of Ahmed Ben Bella, Hamdani was appointed ambassador to Belgium.