A small Italian hamlet unexpectedly gained independence for four centuries due to a surveying error during a land sale. The territory was known as the Republic of Cospaia from 1440 to 1826.