It was created a villa with an ayuntamiento (city council) in 1743.
In the municipality the alcalde (mayor) was appointed by the governor-general, and the ayuntamiento (council) was controlled by the veto of the provincial governor and by the assembly of the province.
In the next year it received an ayuntamiento (council).
So important already was the city that its ayuntamiento had the powers of a Spanish city of the second class.
The local authorities were divided among themselves by bitter feuds - the ecclesiastical against the civil, the ayuntamiento against the governors, the administrative officers among themselves; brigandage, mutinies and intestinal struggles disturbed the peace.