 In New Spain, all of the fighting by those seeking independence was done in the center of that area from 1810 to 1821, what today is central Mexico.Once the Viceroy was defeated in the capital city—today Mexico City—in 1821, the news of independence was sent to all the territories of New Spain, including the Intendencies of the former Captaincy General of Guatemala.Costa Rica joined the other Central American Intendancies in a joint declaration of independence from Spain, the 1821 Act of Independence.