In 1440, a land sale treaty between the Pope and Florence accidentally left out a small strip of land around Cospaia. The people of the area promptly declared their independence and remained sovereign for nearly 400 years.