QUITO (Reuters) - Police protesters attacked Ecuadorean President Rafael Correa in an eruption of political unrest over austerity measures on Thursday, leaving the leftist leader holed up in a hospital with demonstrators outside.

Some of the president’s supporters hurled stones at police around the building and the officers fired teargas back in unrest that Correa called a coup attempt against him.

Venezuela’s President Hugo Chavez, the main regional ally of the leftist Correa, said his friend told him by phone that police chiefs were making demands of him at the hospital.

“He told them that once he had left he would be very happy to receive them, but that they had kidnapped him, and he would not give in to blackmail,” Chavez said on Venezuelan state TV.

Correa’s life was in danger, Chavez added, and he urged the Ecuadorean military not to support the attempted “coup”.

Ecuador, a South American OPEC member of some 14 million people, has a long history of political instability.

Street protests toppled three presidents during economic turmoil in the decade before Correa took power.

Correa, a U.S.-trained economist, alienated foreign capital markets two years ago when his government defaulted on $3.2 billion in global bonds. Cash has been tight since as the nation relies on multilateral loans and bilateral lending to meet international financing needs.

The clashes outside the hospital followed a chaotic morning in which Correa and his wife were attacked, troops took over the main international airport, and protesting police burned tires in demonstrations against planned cuts to their bonuses.

Correa said he and his wife were jostled and stunned by an exploding tear gas canister as he tried to speak to demonstrators. Witnesses and local media said Correa was also hit by a flying object in the melee.

Visibly furious, he confronted the officers demonstrating against the planned budget cuts and challenged them: “Kill me if you want to. Kill me if you have the courage.”

LOOTING

Foreign Minister Ricardo Patino called on a large crowd gathered outside the presidential palace, telling them people were trying to attack the president in the hospital and that they should march with him to save their trapped leader.

“The president is being held hostage inside,” shouted Fernando Jaramillo, 54, a Correa supporter at the hospital.

Witnesses said there was looting in Quito and in Guayaquil city, and that many workers and school students were sent home.

State oil company Petroecuador said operations were unaffected and troops had boosted security at its oil fields.

Messages of support for Correa flowed in from abroad, with the Organization of American States and the governments of France, Venezuela, Chile, Argentina and others backing his government.

Slideshow ( 18 images )

Chavez said he was about to fly to Argentina for an emergency meeting of regional body UNASUR to discuss the events. Peru’s and Colombia’s leaders said they were also going.

Correa is looking at the option of dissolving Congress, where members of his own left-wing party are blocking proposals aimed at cutting state costs.

Ecuador’s two-year-old constitution lets the president declare an impasse, dissolve Congress and rule by decree until a new presidential and parliamentary election. That move would still need to be approved by the Constitutional Court.

Slideshow ( 18 images )

POLICE BLOCK ROADS

Police apparently led the protests on Thursday but some soldiers joined in solidarity. “We are demanding that the president revoke the military service law,” one soldier at the airport told Reuters, asking not to be named.

Armed forces’ head Ernesto Gonzalez said troops were not rising up. “We are loyal to the maximum authority, which is the president,” he told reporters.

Central bank chief Diego Borja called for calm and urged Ecuadoreans not to withdraw money from banks.

Peru and Colombia, meanwhile, closed their borders with neighboring Ecuador.

More than half Ecuador’s 124-member Congress is officially allied with Correa, but the president has blasted lawmakers from his Country Alliance party for not backing his budget proposals.

“The (government) finally realizes that maybe their current spending could not continue but they don’t really have a Plan B, nothing to cover shortfalls given the lack of investor friendly policies,” said Roberto Sanchez-Dahl, portfolio manager at Federated Investors in Pittsburgh.

Correa was first elected in 2006 promising a “citizens’ revolution” aimed at increasing state control of natural resources and fighting what he calls the country’s corrupt elite.

Correa is renegotiating contracts with oil companies in a bid to increase state revenue. Private firms working in Ecuador include Spain’s Repsol, Brazil’s Petrobras and Italy’s Eni.