Meanwhile a formidable rival to the Dutch company, the English East India Company, had arisen, but the accession of a Dutchman, William, Prince of Orange, to the throne of England in 1688 turned the rivals into allies, the trade of the eastern seas being divided between them. But toward the close of the eighteenth century there came another change in the _status quo_, for the Dutch, by allying themselves with the French, became the enemies of England. By this time Great Britain had become the greatest sea power in the world, so that within a few months after the outbreak of hostilities in 1795 the British flag had replaced that of the Netherlands over Ceylon, Malacca, and other stations on the highway to the Insulinde. When the Netherlands were annexed to the French Empire by Napoleon in 1810 the British seized the excuse thus provided to occupy Java, Thomas Stamford Raffles, the brilliant young Englishman who was then the agent of the British East India Company at Malacca, in the Malay States, being sent to Java as lieutenant-governor. Urgent as were his appeals that Java should be retained by Britain as a jewel in her crown of empire, the readjustment of the territories of the great European powers which was effected at the Congress of Vienna, in 1816, after the fall of Napoleon, resulted in the restoration to the Dutch of those islands of the Insulinde, including Java, which the British had seized. But, though Raffles ruled in Java for barely four and a half years, his spirit goes marching on, the system of colonial government which he instituted having been continued by the Dutch, in its main outlines, to this day. He won the confidence and friendship of the powerful native princes, revolutionized the entire legal system, revived the system of village or communal government, reformed the land-tenure, abolished the abominable system of forcing the natives to deliver all their crops, and gave to the Javanese a rule of honesty, justice and wisdom with which, up to that time, they had not had even a bowing acquaintance. As a result of the lessons learned from Stamford Raffles, the Dutch possessions in the East are today more wisely and justly administered than those of any other European nation.