Ecuador's president and indigenous leaders reached an agreement on Sunday to end nearly two weeks of violent protests against austerity measures put in place to obtain a multi-billion-dollar loan from the IMF.
President Lenin Moreno met with Jaime Vargas, the head of the indigenous umbrella grouping CONAIE, for four hours of talks in the capital Quito broadcast live on state television.
"With this agreement, the mobilisations... across Ecuador are terminated and we commit ourselves to restoring peace in the country," said a joint statement, adding the government had withdrawn an order that removed fuel subsidies.
Rocketing prices after Moreno cut the subsidies to obtain a $4.2bn loan from the International Monetary Fund sparked 12 days of demonstrations that left seven people dead.
The statement was read by an official from the United Nations, which mediated the talks along with the Catholic Church.
"The measures applied in all our territories are lifted," confirmed Vargas, wearing face paint and a head wreath of feathers.
Moreno had declared a curfew and placed Quito under military control to quell the unrest.
On Sunday, violent clashes continued before the talks began as police fought to disperse protesters who tried to put up a barricade of debris from Saturday's unrest.
"Native brothers, I have always treated you with respect and affection," Moreno said as the talks opened. "It was never my intention to affect the poorest sectors."
Protesters had converged on Quito from around the country. Authorities said 1 349 people had been injured and 1 152 detained in the demonstrations.
The violence forced Moreno to relocate his government to Ecuador's second city, Guayaquil, and hit the oil industry hard with the energy ministry suspending more than two-thirds of its distribution of crude.
Protesters seized three oil facilities in the Amazon.
CONAIE had previously rejected an offer of dialogue but reversed course on Saturday.
UN Secretary General Antonio Guterres earlier called on all groups "to commit to inclusive and meaningful talks, and to work in good faith towards a peaceful solution".
Ecuador's indigenous groups make up a quarter of the country's 17.3 million people. Thousands from disadvantaged communities from across the Amazon and the Andes have travelled to Quito to spearhead demands the subsidies be reinstated.
Demonstrators on Saturday ransacked and set fire to the building housing the comptroller general's office, which was shrouded in thick smoke after being attacked with fire bombs.
The prosecutor's office said 34 people were arrested.
Protesters on Saturday also targeted a television station and a newspaper.
The Teleamazonas TV channel interrupted its regular broadcast to air images of broken windows, a burned vehicle and heavy police presence on the scene.
The station evacuated 25 employees, none of them hurt.
Nearby, protesters built barricades in front of the National Assembly building as police fired tear gas at them.
"We have nothing to do with the events at the comptroller's office and Teleamazonas," said CONAIE.
El Comercio newspaper reported that its offices were attacked by a "group of unknowns".
Protesters did not immediately heed the curfew that went into effect on Saturday, with security forces struggling to impose order in some parts of the city.
"Where are the mothers and fathers of the police? Why do they let them kill us?" cried Nancy Quinyupani, an indigenous woman.
The restrictions in Quito, a city of 2.7 million, came on top of a state of emergency Moreno had declared on October 3, deploying some 75 000 military and police and imposing a nighttime curfew in the vicinity of government buildings.
Moreno is struggling with an economic crisis that he blames on waste and corruption by Correa's administration.