When Somalia gained its independence on July 1, 1960, Daar was elected as the first president of Somalia. He was beaten in the 1967 presidential election against Abdirashid Ali Shermarke. He finished his term as president on June 10, 1967.