An agreement has been reached in Ecuador to end a strike that had shut down oil exports from the country's two largest oil-producing regions and had triggered violent protests.

The accord was reached Thursday between the protesters and oil companies after four days of talks. It calls for those companies to invest more in the poor communities where they drill, including repairing highways.

However, the accord does not include a key demand of the demonstrators - that they not face prosecution for damaging oil installations during the protests.

The strike and protests led the government to declare a state of emergency in Orellana and Sucumbios provinces and to put them under military control.

Most of Ecuador's oil exports go to the United States.

Some information for this report provided by AP and Reuters.