Late in November 1807 a French army under General Junot crossed the frontiers of Portugal. Early in the morning of the 29th the prince regent, later King John VI, his demented mother, Queen Maria I, his termagant wife, Carlota Joaquina, the daughter of Charles IV of Spain, the rest of the royal family, and an immense crowd of courtiers, set sail from the Tagus to seek refuge in Brazil. The fleet, convoyed by British warships and carrying a great quantity of treasure, was dispersed by storm. Some of the vessels made Rio de Janeiro on 15 January. The prince regent himself, however, first touched Brazilian soil at Bahia six days later, and there, on the 28th, he issued the famous Carta Régia declaring the ports of Brazil open to the trade of all friendly nations. Once more embarking, he reached Rio de Janeiro on 7 March, to land, amid scenes of great enthusiasm, on the following day.
The effects of this royal hegira, of the arrival of the court, and of the opening of the ports, were immediate and profound. An impulse of fresh and vigorous life was transfused throughout the colony. ‘New people, new capital, and ideas entered.’ A bank was founded, a printing press introduced, a royal library opened, a gazette established. Foreigners were invited to enter the country, industry was encouraged. European diplomats, English merchants, German scientists, even a colony of Chinese tea-planters arrived at Rio de Janeiro, now the British South American naval base as well as the metropolitan seat of government.