In 1832, Mayotte was conquered by Andriantsoly, former king of Iboina on Madagascar; in 1833, it was conquered by the neighbouring sultanate of Mwali (Mohéli island in French). On 19 November 1835, Mayotte was again conquered by the Ndzuwani Sultanate (Anjouan sultanate in French); a governor was installed with the unusual Islamic style of Qadi (from the Arabic قاض which means judge). However, in 1836 it regained its independence under a last local Sultan. Andriantsoly won again the island in 1836, but his depopulated and unfortified island was in a weak position towards the sultans of Comoros, Malagasy kings and pirates. Looking for the help of a powerful ally, he began to negotiate with the French, installed in the nearby Malagasy island of Nosy Bé in 1840.