The struggle between Guelphs and Ghibellines was a feature of Parma too. In 1213, her "podestà" was the Guelph Rambertino Buvalelli. Then, after a long stance alongside the emperors, the Papist families of the city gained control in 1248. The city was besieged in 1247–48 by Emperor Frederick II, who was however crushed in the battle that ensued.