After the Battle of Ayacucho, all Hispanic American countries, except Peru, had signed peace treaties with Spain acknowledging their independence. This had not been an obstacle for participating in various acts of goodwill between Peru and Spain, but there were certainly no official relations.