However, on January 20, 1839, the restorative forces of the Chilean Manuel Bulnes and the Peruvian Agustín Gamarra achieved the victory of Yungay against Santa Cruz during the War of the Confederation, which put an end to the Peru-Bolivian Confederation. On February 14, 1839, General Velasco, the new president of Bolivia, informed the governor of Jujuy of the end of the state of war and showed himself willing to negotiate the problem of Tarija. On April 26, 1839, General Rosas officially put an end to the war without taking advantage of the defeat of Santa Cruz to advance on Tarija, allowing them to decide the issue. They remained on the Bolivian side. The territory of the Puna de Jujuy, Iruya and other occupied populations were returned by Bolivia in March 1839.