In 1776 the Spanish Crown established the Viceroyalty of the Río de la Plata, an umbrella of territories from which, with the Revolution of May 1810, began a process of gradual formation of several independent states, including one called the United Provinces of Río de la Plata. With the declaration of independence on July 9, 1816, and the military defeat of the Spanish Empire in 1824, a federal state was formed in 1853–1861, known today as the Argentine Republic.