Faithful generals such as Miguel Miramón, Leonardo Márquez, and Tomás Mejía vowed to raise an army that would challenge the invading Republicans. Maximilian fought on with his army of 8,000 Mexican loyalists. Withdrawing, in February 1867, to Santiago de Querétaro, he sustained a siege for several weeks, but on 11 May resolved to attempt an escape through the enemy lines. This plan was sabotaged by Colonel Miguel López who secretly agreed with the Republican General Escobedo to open a gate and lead a raiding party to seize the Imperial headquarters. Lopez appears to have assumed that Maximilian would be allowed to escape.