Army of the Three Guarantees
In Mexico he joined the Army of the Three Guarantees headed by Agustín de Iturbide, and was appointed as Chief of Staff. He successfully fought for Mexico's independence from Spain, achieved in 1821, after which the people proclaimed Iturbide the Emperor of Mexico. Since Valero de Bernabé had developed anti-monarchist feelings following his experiences in Spain, he revolted against Iturbide. It did not succeed and he fled the country, but was captured by a Spanish pirate. Turned over to the authorities in Cuba, he was imprisoned. Valero de Bernabé escaped from jail with the help of a group of pro-Bolívar men, supporters of an independent South America.