The republic of Cospaia was a small independent territory from February 1441 to June 1826.
Currently it is a fraction of the Municipality of San Giustino.
The small became independent when, in February 1441, Pope Eugenio IV ceded the territory of Sansepolcro to the Republic of Florence. By mistake in the designation of the border, a small strip of land was excluded in the treaty that delimited the borders, and the inhabitants of Cospaia declared not to accept any authority.
For years the small community provided for its subsistence by cultivating tobacco, called by the “erba tornabuona”. For irrigation needs an embankment was raised as a dam to create a small lake. It was precisely in Cospaia that the clandestine cultivation and trade of tobacco brought a certain prosperity, but also a small invasion of smugglers, considering that smoking and sniffing tobacco were proclaimed illegal in the Papal States.