Ejército Trigarante
In 1817, the royalists took him prisoner and it was only in 1820 that he recovered his freedom. He allied himself with the Plan de Iguala, and on 27 September 1821, he entered Mexico City with the triumphant Ejército Trigarante (in the "Army of the Three Guarantees").