The independence wars in Chile (1810–1818) and Peru (1809–1824) had a negative impact on the Chilean economy. Trade was disrupted and armies in Chile pillaged the countryside. The war made commerce a high risk activity and royalist Peru, then the only market for Chilean agricultural products, was closed to commerce with independent Chile. The Guerra a muerte phase was particularly destructive for the Biobío area and ended only to see a period of outlaw banditry (e.g. Pincheira brothers) occur until the late 1820s. Chilean mining activity came out of the independence wars with relatively little damage.