After nearly two weeks of protests in Ecuador, President Lenín Moreno and Indigenous leaders came to a peaceful compromise on Sunday.

Under a new agreement, the federal government will cancel a controversial austerity package, which drove up fuel costs, while Indigenous leaders will ask their communities to end demonstrations.

‘With this agreement, the mobilization … across Ecuador are terminated and we commit ourselves to restoring peace in the country,” reads a joint statement, according to the Daily Mail.

Moreno met with Jaime Vargas, the head of the Confederation of Indigenous Nationalities of Ecuador (CONAIE), for four hours to negotiate the accord in Quito, the South American country’s capital. The two sides also announced that they would be working together to develop a new package of measures to cut government spending, increase revenue and reduce Ecuador’s budget deficits and public debt.

At a park that days earlier was filled with violent protests, thousands of Ecuadorians celebrated the announcement, waving their yellow, blue and red flags, banging pots, honking horns and shouting, “We did it!”

“The moment of peace, of agreement, has come for Ecuador,” Arnaud Peral, the United Nations’ resident coordinator in Ecuador who helped mediate the nationally televised conversation, said. “This deal is an extraordinary step.”

After Moreno eliminated subsidies, gasoline hiked from $1.85 to $2.39 a gallon and diesel from $1.03 to $2.30, which contributed to the doubling of essential products.

The last 10 days of protests against the austerity measures left seven people dead, reduced Ecuador’s oil production — putting a pause on the country’s most important export — closed businesses, blocked roads and forced Moreno to relocate his government to Ecuador’s second city, Guayaquil.

In addition to a seat at the table to discuss government spending, Indigenous leaders have also asked for higher taxes on the wealthy and the firing of the interior and defense ministers due to their handling of the protests. During the unrest, Moreno’s administration placed Quito under military control. The Daily Mail reports that 1,349 people were injured and 1,152 had been detained.

“From our heart, we declare that we, the peoples and nations, have risen up in search of liberty,” Vargas said. “We recognize the bravery of the men and women who rose up.”

Indigenous groups make up a quarter of Ecuador’s 17.3 million people. Thousands who had traveled to the capital from their communities in the Amazon and the Andes to raise their voices in protest began heading home following the celebrated announcement.