QUITO, Ecuador — The government of Ecuador and Indigenous leaders struck a deal late Sunday to cancel an economic austerity package that had ignited 11 days of protests that paralyzed the country and left at least seven people dead and more than 1,000 injured.
The agreement concluded a weekend of violence that included fires in the capital, Quito, and attacks by masked protesters on news outlets and the national auditor’s office. President Lenín Moreno instituted a curfew and ordered the army to take control of public places, but explosions and clouds of tear gas engulfed much of the city Sunday afternoon.
Under the agreement, Mr. Moreno pledged to withdraw from an International Monetary Fund-backed program, known as Decree 883, that raised fuel prices, and the Indigenous leaders agreed to call off more protests. The two sides agreed to work together to put in place a new economic policy of government spending cuts and taxes to increase revenues.
“Comrades, this deal is a compromise on both sides,” Mr. Moreno said. “The indigenous mobilization will end and Decree 883 will be lifted.”
Celebrations broke out after the announcement, with caravans of cars roaming the streets early on Monday honking in celebration, passengers shouting, banging pots and waving Ecuadorean flags.
The demonstrations had threatened the stability of government of Mr. Moreno. He was forced to balance demands of the Indigenous protesters, whose opposition has contributed to the downfall of three modern presidents, and those imposed by the I.M.F. as a condition for a $4.2 billion loan to shore up the country’s finances.
Central to the contention were Ecuador’s fuel subsidies, which had been in place for four decades, but were slashed by Mr. Moreno, who said they cost the country $1.3 billion a year. Outrage over their elimination set off the demonstrations, which have been so fierce that Mr. Moreno had to move the seat of government from Quito to the coastal city of Guayaquil, more than 150 miles away.
But elimination of the popular subsidies was a keystone of the broad austerity plan required by the IMF in order to extend Ecuador a credit line. The loan was meant to bolster the country’s economy, which has deteriorated in recent years because of lower oil prices and a strengthening dollar that has left the country’s exports more expensive. Ecuador has used the dollar as its own currency since a financial crisis in 2000.
Gasoline prices have already increased from $1.85 to about $2.40 a gallon, while diesel prices have more than doubled. Higher gasoline and diesel prices are particularly hard on the rural poor. Indigenous groups opposed to the subsidy cut have blocked roads and city streets and disrupted oil operations.
Mr. Moreno said on Saturday he was willing to reconsider the economic policies that spurred the protests. He would review plans to cut salaries and vacations for government workers, and proposed a $20 monthly salary bonus to private sector employees.
He was less specific about what he would offer Indigenous people, saying, “Let’s embrace a solution in which resources go to those who most need them.”
In response, the largest Indigenous umbrella group responded it was willing to talk with the government — a conversation held under the auspices of the Ecuadorean Catholic Church and the United Nations.
Talks were delayed for hours because of “technical and security conditions,” mediators said in a statement, but started on Sunday evening.
Mr. Moreno had held fast to his plans to slash subsidies until the surprise agreement.
Jaime Vargas, the president of the Confederation of Indigenous Nationalities of Ecuador, had opened the talks with harsh words describing Mr. Moreno’s slashing of subsidies. “It’s a measure that offers no benefit,” he said, “only more social injustice.”
Indigenous groups are a political force to be reckoned with in Ecuador. Their protests were key to the downfall of several governments, including those of Presidents Abdalá Bucaram in 1997, Jamil Mahuad in 2000 and Lucio Gutiérrez in 2005.
But in recent days, President Moreno had effectively managed to divide the opposition, peeling off truck, bus and taxi drivers from the protests by reaching an agreement with transport unions to increase fares and offering credits on liberal terms to compensate for the higher fuel costs.
He had also received the wholehearted support of the military and security forces, who are concerned that much of the protests are being engineered by former President Rafael Correa, a leftist and ally of President Nicolás Maduro, of Venezuela.
Mr. Moreno was once Mr. Correa’s vice president, and they were longtime allies. But Mr. Moreno broke from Mr. Correa, who is now living in exile in Belgium, and has accused him of corruption. He has veered from Mr. Correa’s populist economic policies in an attempt to attract more private investment, angering some of his leftist supporters in doing so.
In his address Saturday, Mr. Moreno suggested that the fires at the national auditor’s office were set to destroy evidence of corruption under Mr. Correa’s government. Indigenous leaders said their followers were not responsible.
The protests have already done serious harm to the Ecuadorean economy. Demonstrators broke into facilities of Petroamazonas, the state oil production company, forcing it to shut down several oil fields and pipelines. The Trans-Ecuadorian oil pipeline, which connects the Amazonian fields to export terminals, has been closed, paralyzing international sales of 360,000 barrels of crude a day.
With oil contributing more than half of the country’s exports and 25 percent of the government’s revenues, Mr. Moreno was under pressure to resume full oil production — and quell the protests.