Louis XVI (r. 1774–1793), actively supported the Americans with money, fleets and armies, helping them win independence from Great Britain. France gained revenge but spent so heavily that the government verged on bankruptcy—a factor that contributed to the French Revolution. Much of the Enlightenment occurred in French intellectual circles, and major scientific breakthroughs and inventions, such as the discovery of oxygen (1778) and the first hot air balloon carrying passengers (1783), were achieved by French scientists. French explorers, such as Bougainville and Lapérouse, took part in the voyages of scientific exploration through maritime expeditions around the globe. The Enlightenment philosophy, in which reason is advocated as the primary source for legitimacy, undermined the power of and support for the monarchy and also was a factor in the French Revolution.