Guatemala with its provinces (Chiapas, Soconusco, El Salvador, Honduras,
Nicaragua, Los Altos, and Costa Rica) declared its independence from the Spanish Crown (15-09-1821) and, shortly after, annexed Mexico to defend itself
better from Spain.
Panama belonged to the Viceroyalty of New Granada and, therefore, became
independent along with Colombia.