So the king took refuge in the palace, while the populace gained control of the main streets of the city and prepared for battle.