It began with a military insurrection in the city of Porto, in northern Portugal, that quickly and peacefully spread to the rest of the country. The Revolution resulted in the return in 1821 of the Portuguese Court to Portugal from Brazil, where it had fled during the Peninsular War, and initiated a constitutional period in which the 1822 Constitution was ratified and implemented. The movement's liberal ideas had an important influence on Portuguese society and political organization in the nineteenth century.