Did Mexico become a country in 1849?

Mexico gained its independence from the Spanish Empire in 1821, and subsequently declared itself a country. Therefore, Mexico did not become a country in 1849.
Copyright Wanderlust World © https://www.ynyoo.com