The British imposed the next limitation on Nair dominance. After signing the treaty of subsidiary alliance with Travancore in 1795, British residents were sent to the Travancore administration; the interference from the British had caused two rebellions in 1804 and 1809, the latter of which was to have lasting repercussions. Velu Thampi, the Nair dewan of Travancore, led a revolt in 1809 to remove British influence from the Travancore sarkar. After a few months, the rebellion was defeated and Velu Thampi had committed suicide. Afterwards, the Nairs were disbanded and disarmed. Up to this time the Nairs had been historically a military community, who along with the Nambudiri Brahmins owned most of the land in the region; after it, they turned increasingly to administrative service. By this time there were nine small Nair kingdoms and several chiefdoms which were loosely affiliated to them; the British amalgamated seven of those kingdoms (Calicut, Kadattunad, Kolattunad, Kottayam, Kurumbranad, Palghat and Walluvanad) to form Malabar District, while Cochin and Travancore were left as native states under the control of their own rulers but with advice from the British. Velu Thampi's rebellion had made the British wary of Nair leaders, and the Travancore sarkar was mainly under control of British residents although the rest of the administration had been handled for the most part by non-Malayali Brahmins and Nairs.