Eventually the people revolted and established their own government.
In truth, Joseph Bonaparte meant well he built so many plazas that Madrileos nicknamed him El Rey Plazuelas but the people loathed a government imposed from abroad.