The Federated Malay States (FMS, Malay: Negeri-negeri Melayu Bersekutu, Jawi: نݢري٢ ملايو برسکوتو) was a federation of four protected states in the Malay Peninsula—Selangor, Perak, Negeri Sembilan and Pahang—established by the British government in 1896, which lasted until 1946, when they, together with two of the former Straits Settlements (Malacca and Penang) and the Unfederated Malay States, formed the Malayan Union. Two years later, the Union became the Federation of Malaya, which achieved independence in 1957, and finally Malaysia in 1963 with the inclusion of North Borneo (present-day Sabah), Sarawak and Singapore.
Real power in the FMS and its constituent states rested with the four local British Residents and the Resident-General, the discretionary powers of the local sultans being essentially reduced to matters "touching Malay Religion and Customs".
The federation, along with the other Malay states and British possessions of the peninsula, was overrun and occupied by the Japanese during World War II. After the liberation of Malaya following the Japanese surrender, the federation was not restored, but the federal form of government was retained as the principal model for consolidating the separate States as an independent Federation of Malaya and the Federation's later evolution into Malaysia.
References: