Ecuador's defense minister resigned Friday during protests which have crippled oil production and forced the country to ask Venezuela for a loan of crude oil so it can keep up exports, officials said.

Ecuador will seek a $400 million emergency loan from the Latin American Reserve Fund to avoid balance of payments problems resulting from the protest in two provinces and import $140 million worth of fuel, Economy Minister Magdalena Barreiro said.

The protests pushed U.S. crude oil futures up $2 above $65 a barrel in New York Friday. Ecuador is South America's fifth largest producer of crude oil and, after Venezuela, is the second-largest South American supplier of oil to the United States.

Defense Minister Solon Espinoza resigned at the request of President Alfredo Palacio for his handling of the worst crisis since Palacio took office in April, officials at the president's office said.

The protesters are demanding foreign oil companies operating in the region provide financing for infrastructure projects and more job opportunities.

Palacio blamed Espinoza for allowing protests to get out of hand and named a popular retired army general, Osvaldo Jarrin, in his place, they said.

The government declared a state of emergency on Wednesday and ordered troops to restore order in Sucumbios and Orellana provinces where protesters began to invade oil camps, sabotage equipment and block highways on Monday.

Demonstrators also want the government to renegotiate contracts with Occidental Petroleum Corp., Petrobras and EnCana Corp., to raise state participation.

Troops fired tear gas at protesters who tried to free the mayor of the jungle city of Lago Agrio from a police station on Friday, local radio reported.

Army Gen. Gonzalo Mesa told Reuters the situation in Lago Agrio was "manageable."

Troops have retaken control of local airports and are clearing obstacles left on the runways, he said.

Oil output at state-owned Petroecuador, which has fallen to zero from its usual 201,000 barrels per day, will only return to normal in November, Economy Minister Magdalena Barreiro told reporters.

Most of Petroecuador's exports go the United States. The company suspended its exports on Thursday, declaring force majeure - a contractual clause invoked in case of events beyond the company's control.

Ecuador will ask Venezuela to lend it crude oil so it can meet export commitments, Barreiro said.

"We need the crude loan for us to be able to export and partly normalize our exports," Barreiro said.

She did not say how much oil Ecuador wanted but said Foreign Minister Antonio Parra would present the request to Venezuelan President Hugo Chavez at a meeting in Cuba Friday.

Ecuador will meet its debt liabilities despite the protest, Barreiro said.

Ecuador defaulted on foreign bonds in 1999 but has since grown strongly with low inflation, partly thanks to the introduction of the U.S. dollar as currency in 2000.

The government has accused former President Lucio Gutierrez, who was sacked by Congress in April and is now in Peru, of being behind the demonstrations.

But Palacio himself might have helped trigger the protests by inflaming popular expectations with moves including diverting money from a fund previously destined for debt payments to pay for social programs, according to Alberto Ramos, an economist at Goldman Sachs in New York.

These moves have been harshly criticized by foreign bond holders.

The government is "extremely vulnerable to social activism and other rent-seeking pressures," Ramos said in a research note.

Three Ecuadorian presidents have been toppled amid popular unrest since 1997.