This word first entered the English language in 1698, when John Fryer used it in A New Account of East India and Persia. It comes from two Sanskrit words: maha, “great,” and raja, “prince,” and was used by the inhabitants of India itself to describe any very powerful and wealthy ruling prince.
The India of 1698 was largely a land of mystery to the English, whose chief contact with the large subcontinent at that time was through the East India Company, chartered by Queen Elizabeth I in the year 1600. By the end of that century, the company was doing a brisk business in Bombay, Madras and Calcutta and was casting covetous glances at the riches of the interior. In order to protect its trade, the officers of the company allied themselves with Native troops and princes, who often managed to embroil the British in their own squabbles with neighbouring tribes and rulers.
But direct British rule in India did not begin to take root until the latter half of the eighteenth century, and that was when a new synonym for maharajah managed to elbow its way into the English language: "Panjandrum".