In 872, Pope John VIII brought it under the domination of the Holy See. However, after the crisis of papal authority in the following century, Terracina came to be ruled by local or Roman families (like that of Crescenzi, who built a massive castle, or the Frangipani, who occupied it from 1153 to 1202). In 1088 it was the seat of the first conclave held outside Rome. In the 11th and 12th centuries Terracina had a notable spurt of growth, and two new suburbs were built next to the two walled gates of Porta Maggio ("Cipollata"), Porta Albina, Porta St. Gregory and Porta Romana. A free commune was also instituted. In 1217 Pope Honorius III united its diocese to those of Sezze and Priverno.