GUAYAQUIL, Ecuador — President Lenín Moreno of Ecuador moved the seat of his government from Quito, the capital, to a coastal city more than 150 miles away late Monday in an attempt to protect his government from the large protests against austerity that have racked the country over the past week.

On Tuesday afternoon in the capital, a group of protesters stormed the National Assembly, the police fired tear gas in response and an Indigenous coalition approached the presidential palace, showing that Mr. Moreno’s departure had failed to quell anger toward him. Ecuador has been in turmoil since last week, when Mr. Moreno announced a number of measures — part of an austerity plan imposed by the International Monetary Fund — that are meant to lower debt and prime the economy for growth.

The measures caused a spike in fuel prices, enraging many transportation workers, young people and Indigenous groups, who have suffered years of economic malaise as Ecuador has sunk into billions of dollars of debt and then tried to slash its way free.

As the protests mounted this week in Quito, Mr. Moreno declared a state of emergency, allowing him to suspend certain civil liberties and move the president’s seat away from the capital, to the city of Guayaquil — a measure that has never been taken before. The protests and his responses to them threatened to tumble Ecuador into chaos, worsening instability in a region already struggling with millions of Venezuelan refugees and their country’s economic collapse.