Answer
Spain was the country from which Alta California declared independence. Alta California, a region in present-day California and Nevada, was a province of the Spanish Empire. In 1846, during the Mexican-American War, Alta California declared independence from Mexico, which had gained independence from Spain in 1821. However, the United States quickly occupied the region, and it was formally ceded to the U.S. in the Treaty of Guadalupe Hidalgo in 1848.