Muhammad Siyad Barre, the dictator of the Somali Democratic Republic since 1969, flees Mogadishu as rebels overrun his palace and capture the Somali capital. In 1969, Somalian President Abd-i-rashid Ali Shermarke was assassinated, and a few days later Major General Barre seized power in a military coup. Barre's government developed strong ties with the USSR and other Soviet-bloc nations during the 1970s but in 1978 lost Soviet support when it invaded Ethiopia to regain pre-colonial Somali territory. The attack was repelled within a year, but protracted guerrilla warfare continued into the 1980s, bolstered by U.S. support for the Somalis. Several hundred thousand refugees fled to Somalia to escape the conflict, and by the late 1980s economic depression contributed to the outbreak of civil war in Somalia. In early 1991, rebels ousted Barre after intense and bloody fighting, and Ali Mahdi Muhammad of the United Somali Congress took control of Mogadishu and the rest of southern Somalia.