Somalia became independent in 1960, creating the Somali Republic from former Italian Somaliland and former British Somaliland. The first leaders of the new republic were President Aden Abdullah Osman Daar who served as head of state and Prime Minister Mohammad Egal of the Somali Youth League. Because Somalia was composed of two recently unified territories, the country was divided in many aspects such as taxation, policing, legal systems, and administration, however these differences were largely resolved in a 1961 referendum on a new constitution which saw more than 90% of voters approve the document. The constitution which merged Italian and British colonial institutions established a parliamentary democracy and was intended to create a single national identity.
Despite the ratification of a new constitution, Somalia remained deeply divided among ethnic, political, and clan lines. In 1961, a rebellion by British trained junior army officers in northern Somalia took place however it was quelled, resulting in one officer being killed. The country's first legislative elections were held in 1964, and the Somali Youth League won 69 out of 123 seats in the National Assembly. The rest of the seats in the parliament were split between 11 parties. In 1967, Abdirashid Ali Shermarke, the Italian educated prime minister and member of the Somali Youth League (SYL), was elected as president of Somalia. In March 1969 another legislative election was held with 64 parties in the running with the SYL being the only political party to have candidates in every election district. The number of political parties was typical of Somalia due to the wide array of differing clans and ethnic groups and the fact that the prerequisite to running was simply clan sponsorship or the support of 500 voters.
The election was highly contentious and saw the Somali Youth League gain an even greater majority in the parliament. Allegations of electoral fraud and corruption were rampant and more than 25 people were killed in election-related violence. A general perception grew among Somalis that the SYL was becoming increasingly authoritarian in its rule. This view was compounded by the newly formed government under Prime Minister Egal largely ignoring allegations of fraud and corruption. This sweeping unrest and dissatisfaction created an unhealthy political situation in the country that paved the way for the October coup by Siad Barre and other officers.
Major General Siad Barre, a former Italian colonial police officer and member of the Darod clan, was the commander of the Somali army, and an ardent Marxist and nationalist due to his experiences with Soviet advisers as an army officer in the 1960s. He emerged as the leader of the Supreme Revolutionary Council a group of Somali military and police officers ranging in rank from major general to captain.