President Rafael Correa of Ecuador has declared a state of emergency in an Amazon province where protests have cut oil output by about 20%.
The demonstrators want the government to spend more revenue from oil on infrastructure in Orellana province.
Mr Correa said he would not let a handful of "lunatics" harm the interests of 13 million Ecuadoreans.
Oil accounts for about 40% of Ecuador's export earnings but protests in the oil-rich Amazon often hit production.
Mr Correa also sacked the interior minister, Gustavo Larrea, saying he had failed to quell the protests and underplayed the problem in his reports.
Mr Correa also forced the head of the state oil company, Petroecuador, to resign and ordered a high-level commission to investigate the unrest.
Demonstrators began taking over oil wells in Orellana on Monday.
They were reported to have cut communication lines and caused minor damage.
"I am not going to permit more anarchy", the president said.
"The irresponsible, crazy people who are behind these attacks on the whole nation must listen. We will punish any act of vandalism with the full force of the law."
Under the rules of the state of emergency, public meetings and marches are be banned, and a curfew put in place.
Petroecuador says it has given the authorities in Orellana province enough revenue to pay for the roads and electricity lines which the protestors are demanding.