The fight against Huerta formally ended on August 15, 1914, when Álvaro Obregón signed a number of treaties in Teoloyucan in which the last of Huerta's forces surrendered to him and recognized the constitutional government.