The coming of the American Revolution had a great impact across the continent. Most importantly it directly led to the creation of the United States of America. However, the associated American Revolutionary War was an important war that touched all corners of the region. The flight of the United Empire Loyalists led to the creation of English Canada as a separate community. Meanwhile, Spain's hold on Mexico was weakening. Independence was declared in 1810 by Miguel Hidalgo, starting the "Mexican War of Independence". In 1813, José María Morelos and the Congress of Anáhuac signed the Solemn Act of the Declaration of Independence of Northern America, the first legal document where the separation of the New Spain with respect to Spain is proclaimed. Spain finally recognized Mexico's independence in 1821.