When was Mexico Established?

Mexico, as an independent nation was established in 1810. Before that, Mexico was formed by many different cultures who became unified under Spanish rule in 1521.