The Soconusco region has produced cacao since 2000 BC. After the Spanish conquest, it was administered under the Kingdom of Guatemala. This region was larger than it is today, with the very south of the old extension now part of Guatemala. As such, Tapachula became a border area, first among the Spanish colonial authorities of New Spain, Chiapas and the Captaincy General of Guatemala. For example, when the Diocese of Chiapas was created in 1539, it included the Tapachula area. However, the Soconusco region had political differences with all of these authorities at one time or another. Tapachula became the capital of Soconusco region in 1794, replacing Escuintla. In 1809, shortly before the start of the Mexican War of Independence, Tapachula protested the high rate of taxation to Spanish authorities to no avail. During the war, it was officially declared a town in 1813, and a parish in 1818, with the San Agustín parish church established in 1819. At the end of the war, Tapachula, as capital of the Soconusco, declared its own independence from Spain and Guatemala in 1821, and away from Mexico in 1824. However, for most of the rest of the 19th century, the Soconusco would be disputed territory between Mexico (as part of Chiapas) and Guatemala, until a final border was drawn between the two countries in 1888. In the meantime, Mexican president Antonio López de Santa Anna declared Tapachula a city as he fought to force the region back under Mexican control. The city was occupied by French troops during the French Intervention in Mexico until 1865 when they were expelled by Sebastián Escobar.