Residents were representatives of the British government in India in the courts of native Indian kingdoms. These kingdoms were ruled by Indian rulers but under the overall control of the British government. The residents ensured that the Indian rulers did not violate the treaty obligations they had towards the British government. The residents also ensured that the Indian rulers did not act in a way that was contrary to the interests of the British government.