Lagos was occupied by British forces in 1851 and formally annexed by Britain in the year 1865. Nigeria became a British protectorate in 1901. The period of British rule lasted until 1960, when an independence movement led to the country being granted independence. Nigeria first became a republic in 1963, but succumbed to military rule three years later, after a bloody coup d'état. A separatist movement later formed the Republic of Biafra in 1967, leading to the three-year Nigerian Civil War. Nigeria became a republic once again after a new constitution was written in 1979. However, the republic was short-lived, as the military seized power again and ruled for ten years. A new republic was planned to be established in 1993, but was aborted by General Sani Abacha. Abacha died in 1998 and a fourth republic was later established the following year, which ended three decades of intermittent military rule.