QUITO, Ecuador — Thousands of Indigenous and student protesters celebrated their victory over the government of Ecuador on Monday by clearing the streets of the capital of debris, following an agreement to cancel an economic austerity package that had ignited 11 days of protests that left at least seven dead and more than 1,000 injured.

The agreement between President Lenín Moreno and Indigenous leaders late Sunday night 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. Mr. 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.

The demonstrations had threatened the stability of the 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 International Monetary Fund as a condition for a $4.2 billion loan to shore up the country’s finances.

Under increasing pressure, Mr. Moreno pledged on Sunday night to withdraw from an International Monetary Fund-backed program, known as Decree 883, that raised fuel prices. In return, 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.