The Treaty of Pilar (in Spanish, Tratado del Pilar) was a pact signed among the rulers of the Argentine provinces of Santa Fe, Entre Ríos and Buenos Aires, which is recognized as the foundation of the federal organization of the country. It was signed in the city of Pilar, Buenos Aires on 23 February 1820 by governor Estanislao López for Santa Fe, caudillo Francisco Ramírez for Entre Ríos, and provisional governor Manuel de Sarratea for Buenos Aires, after the dissolution of the national government caused by the Battle of Cepeda. A reference to it was included in the Preamble of the Argentine Constitution of 1853 as one of the "pre-existing pacts" fulfilled by it.
The treaty established national unity, the end of hostilities between the provinces, the withdrawal of military forces from Buenos Aires, a general amnesty for politically persecuted people, and the free navigability of the rivers Paraná and Uruguay by the signatories. It also called for deputies sent by them to be gathered in a congress in San Lorenzo, Santa Fe, 60 days afterwards, to decide on a federalist form of government. It noticeably excluded José Gervasio Artigas, former leader of the federalist Free Peoples' League, who had recently been defeated in the Battle of Tacuarembó (Eastern Bank, present-day Uruguay) by the Brazilian-Portuguese Empire. Artigas, who had been fighting along Santa Fe and Entre Ríos against the centralist government in Buenos Aires, denounced the pact as a treason on the part of his allies. López wrote back to him explaining that the treaty was for the common good, and wondering whether Artigas was aware of the situation in the provinces.