Quito, Ecuador — President Lenín Moreno and leaders of Ecuador's indigenous peoples struck a deal late Sunday to cancel a disputed austerity package and end nearly two weeks of protests that have paralyzed the economy and left seven dead.

Under the agreement announced just before 10 p.m. after what the Reuters news service said were three hours of televised talks, Moreno will withdraw the International Monetary Fund-backed package known as Decree 883 that included a sharp rise in fuel prices. Indigenous leaders, in turn, will call on their followers to end protests and street blockades.

"Comrades, a deal is compromise on both sides," Moreno said. "The indigenous mobilization will end and Decree 883 will be lifted."

Protesters in Quito, Ecuador celebrate the announcement late on September 13, 2019 that the government cancelled an austerity package that triggered violent protests Dolores Ochoa / AP

The two sides said they would work together to develop a new package of measures to cut government spending, increase revenues and reduce Ecuador's unsustainable budget deficits and public debt.

Get Breaking News Delivered to Your Inbox

"The moment of peace, of agreement, has come for Ecuador," said Arnaud Peral, the United Nations' resident coordinator in Ecuador and one of the mediators of the nationally televised talks, which started about 6 p.m. "This deal is an extraordinary step."

Celebrations followed the announcement in Quito, with cars honking their horns and fireworks going off, Reuters reported.

Wearing the feathered headdress and face paint of the Achuar people of the Amazon rain forest, the president of the Confederation of Indigenous Nations, Jaime Vargas, thanked Moreno and demanded improved long-term conditions for indigenous Ecuadorians.

"We want peace for our brothers and sisters in this country," Vargas said. "We don't want more repression."

Protests over the austerity package have blocked roads, shuttered businesses from dairies to flower farms and halved Ecuador's oil production, forcing a temporary halt to the country's most important export.

In a shift from the heated language of the last 10 days of protests, each side at the negotiations praised the other's willingness to talk as they outlined their positions in the first hour before a short break.

Other indigenous demands included higher taxes on the wealthy and the firing of the interior and defense ministers over their handling of the protests.

"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."

Earlier in the day, hundreds of black-clad riot police drove protesters out of north-central Quito's Arbolito Park, the epicenter of the protests, and into surrounding streets.

Demonstrators protest against Ecuador's President Lenin Moreno's austerity measures, in Quito, Ecuador on October 13, 2019 HENRY ROMERO / REUTERS

The park had filled Friday with mostly peaceful protesters chanting against the government. But by Sunday afternoon, the air was white with smoke from burning tires and tear gas after more than 24 hours of clashes between police and hard-core protesters armed with sharpened sticks and shields improvised out of satellite dishes or plywood. Adjoining streets were piled high with burned tires, tree branches and paving stones.

Volunteer medics from the fire department and medical schools waved white sheets on poles as they led downcast protesters out of the area to safety. Young men from Ecuador's indigenous minority and mixed race, or mestizo, majority, milled about on streets under the watch of police and a few dozen soldiers.

The public ombudsman's office said Sunday that seven people had died in the protests, 1,340 had been hurt and 1,152 arrested. The government loosened a 24-hour curfew imposed Saturday, allowing people to move freely around the capital between 11 a.m. and 8 p.m.

The protests have drawn thousands of Ecuadorians from outside the indigenous minority.

Michael Limaico, an unemployed sign-maker, stood on a corner in the Carcelen neighborhood Saturday near a line of burned tires that blocked one of the Quito's main thoroughfares. Limaico said that he and his wife had struggled for years to feed and house their three children, ages 9 to 15, with their earnings of about $600 a month from odd jobs around northern Quito.

Then, prices of food and other basic goods rose sharply after Moreno removed fuel subsidies Oct. 2. Limaico said it had become impossible to make ends meet, and he had been protesting for days with neighbors who have blocked Diego de Vazquez Avenue as it passes through Carcelen.

"This isn't a protest of thieves, of gangsters," he said. "This is the people, and we're fed up."

Demonstrators clash with police during protests outside the Comptroller's Building before a first meeting of CONAIE and the Ecuadorian Government to resolve the crisis on October 13, 2019 in Quito, Ecuador Getty Images

Moreno said the masked protesters had nothing to do with the thousands of indigenous Ecuadorians who have protested for more than a week over the sudden rise in fuel prices, following on the heels of demonstrations by transport workers. Moreno blamed the violence on drug traffickers, organized crime and followers of former President Rafael Correa, who has denied allegations that he is trying to topple Moreno's government.

Moreno served Correa as vice president before he become president and the two men went through a bitter split as Moreno pushed to curb public debt amassed on Correa's watch.

Foreign Minister José Valencia told The Associated Press on Sunday that the Moreno administration believed Correa, Venezuelan President Nicolas Maduro and Colombia's far-left FARC and ELN guerrillas are working to destabilize Ecuador. He offered no proof beyond the fact that a handful of Correa loyalists and some Venezuelan nationals had been detained during the protests.

"They have a political agenda and the violence and chaos that they sowed yesterday in the city, a coordinated chaos, lets us see this political agenda," Valencia said.

Correa and Maduro have denied involvement in the protests.

Ecuador, a former OPEC member, was left deeply in debt by a decade of high spending by Correa's government and the international decline in oil prices. Moreno is raising taxes, liberalizing labor laws and cutting public spending in order to get more than $4 billion in emergency financing from the IMF.

As part of that plan, Moreno's elimination of subsidies drove the most popular variety of gasoline from $1.85 to $2.39 a gallon and diesel from $1.03 to $2.30. Panic and speculation sent prices soaring, with costs of some products doubling or more.

In the country's Amazon oil fields, protests at installations, described by some government officials as attacks, have halted or slowed production.

Ecuador had been producing 430,000 barrels a day, but that had dropped to 176,029 barrels by Sunday, said an official at state oil producer Petroamazonas, who spoke on condition of anonymity because they were not authorized to release the information. The drop in output has led to a loss of about $14 million a day, the official said.