In the 19th century, Mayotte was conquered by Andriantsoly, former king of Iboina on Madagascar, and later by the neighbouring islands Mohéli and then Anjouan before being purchased by France in 1841. The people of Mayotte voted to remain politically a part of France in the 1974 referendum on the independence of the Comoros. Mayotte became an overseas department on 31 March 2011 and became an outermost region of the European Union on 1 January 2014, following a 2009 referendum with an overwhelming result in favour of the department status.