When did Mexico become North America?

Mexico became part of North America in 1821 when it declared its independence from Spain.