The Mexican Empire or First Mexican Empire was the first independent post-colonial state in Mexico. It was the only former colony of the Spanish Empire to establish a monarchy after independence. It existed from the signing of the Treaty of Córdoba in 1821 until the emperor's abdication in 1823 and the proclamation of the Federal Republic in 1824. A second Mexican Empire was briefly reestablished in 1864.