Eventually, the Liberal Wars ended in 1834 with a victory of the Liberals, who at that time already controlled most of Portugal. A Constitutional Monarchy was then established, lasting until the 5 October 1910 revolution, which replaced it by the First Portuguese Republic. During this period, the blue and white flag was the National Flag of Portugal.