The Treaty of Córdoba was a significant agreement signed in 1821 that marked the end of the Mexican War of Independence and recognized Mexico's independence from Spanish rule. This treaty was pivotal as it formally concluded a long struggle for sovereignty, establishing Mexico as a nation and setting the stage for its future political landscape.