The change from the Viceroyalty into the United Provinces was not merely a change of governors, but a revolutionary process that would replace the absolutist monarchy with a republic. The main influences in this were the Enlightenment in Spain, promoting new ideas, and the Peninsular War that left Spain without a legitimate king after the Abdications of Bayonne. The concept of separation of powers gradually became a tool to prevent despotism.