The Philippines were ceded by Spain to the US in 1898 following the Spanish-American War. They attained their independence in 1946 after being occupied by the Japanese in World War II. The 21-year rule of Ferdinand MARCOS ended in 1986 when a widespread popular rebellion forced him into exile. In 1992, the US closed down its last military bases on the islands. A quarter-century-old guerrilla war with Muslim separatists on the island of Mindanao, which had claimed 120,000 lives, ended with a treaty in 1996.