Backers of Ecuador's new President, Rafael Correa, have stormed a session of Congress, accusing opposition politicians of blocking reform.
Many Ecuadoreans are in favour of a popular assembly
Deputies were discussing the left-wing president's plan to set up a popular assembly to rewrite the constitution when protesters invaded the building.
Police fired teargas at the protesters who wielded sticks and bottles as they briefly managed to get inside Congress.
Mr Correa's government later expressed regret at his supporters' actions.
Government spokeswoman Monica Chuji said: "Peaceful mobilisations are supported by the government, but we are against violence."
Thousands of Mr Correa's supporters had gathered in the capital, Quito, to call on the opposition-controlled Congress to support the president's plans for constitutional reform.
As the crowd grew and some fought their way into Congress, the authorities decided to evacuate the building.
"We had to leave the building because the protest was getting out of hand," Federico Perez, an opposition congressman, told Reuters news agency: "They were yelling: 'Kill them all.'"
The new president is promising fundamental change in Ecuador
The demonstrators then clashed with police, who responded with teargas.
Congress was considering whether to allow a referendum on forming an assembly to change the constitution, in an effort to curb the powers of traditional parties - one of the president's major campaign promises.
It would be made up of regional and national representatives who could make laws bypassing Congress - a move that, according to opinion polls, enjoys about 70% popular support.
President Correa has accused Congress of failing the people and only acting in the interests of the business elite.
His party did not put up any candidates in the last legislative elections, and as a result does not have a single lawmaker.
Many in Congress say Mr Correa's moves are unconstitutional and that he is copying similar radical measures being implemented in Venezuela and Bolivia.