In 1666 the Great Fire of London gutted the City of London but it was rebuilt shortly afterwards with many significant buildings designed by Sir Christopher Wren. In Parliament two factions had emerged – the Tories and Whigs. Though the Tories initially supported Catholic king James II, some of them, along with the Whigs, during the Revolution of 1688 invited Dutch prince William of Orange to defeat James and ultimately to become William III of England. Some English people, especially in the north, were Jacobites and continued to support James and his sons. Under the Stuart dynasty England expanded in trade, finance and prosperity. Britain developed Europe's largest merchant fleet. After the parliaments of England and Scotland agreed, the two countries joined in political union, to create the Kingdom of Great Britain in 1707. To accommodate the union, institutions such as the law and national churches of each remained separate.