TEGUCIGALPA, Honduras — Soldiers ousted the democratically elected president of Honduras on Sunday and Congress named a successor, but the leftist ally of Venezuelan President Hugo Chavez denounced what he called an illegal coup and vowed to stay in power.
The first military takeover of a Central American government in 16 years drew widespread condemnation from governments in Latin America and the world, including the U.S. Chavez vowed to overthrow the country's apparent new leader.
President Manuel Zelaya was awakened Sunday by gunfire and detained while still in his pajamas, hours before a constitutional referendum many saw as an attempt by him to stay in power beyond the one-term limit.
An air force plane flew him into exile in Costa Rica as armored military vehicles with machine guns rolled through the streets of the Honduran capital and soldiers seized the national palace.
"I want to return to my country," Zelaya said in Costa Rica. "I am president of Honduras."
Congress voted to accept what it said was Zelaya's letter of resignation, with even Zelaya's former allies turning against him.
Congressional leader Roberto Micheletti was sworn in to serve until Jan. 27, when Zelaya's term ends. Micheletti belongs to Zelaya's Liberal Party, but he opposed the president on the referendum.
Zelaya denied resigning and insisted he would serve out his term. Micheletti said Zelaya is welcome to return as a private citizen.
Zelaya called on Honduran soldiers to back him, urged citizens to take to the streets in peaceful protests and asked Honduran police to protect demonstrators.
Micheletti was sworn in at a ceremony inside the Congress building with cheers and chants from fellow legislators of "Honduras! Honduras!"
Outside Congress, about 150 people opposed to Zelaya's ouster stood well back from police lines and shook their fists, chanting "Out with the bourgeoisie!" and "Traitors!"
Within hours, Micheletti declared a nationwide, 9 p.m. to 6 a.m. curfew for two days starting Sunday night. He told a news conference he had appointed a new foreign minister: lawyer and former Ambassador to the U.N. Enrique Ortez Colindres.
Micheletti insisted that he did not arrive at his new post "under the aegis of a coup d'état."
"I have reached the presidency as the result of an absolutely legal transition process," he said.
But he warned against outside interference after Chavez remarked that if Micheletti was appointed president, "We will overthrow him."
"We are going to demand respect from any nation that threatens to trample our sovereignty," Micheletti said.
Zelaya's overthrow came hours before polls were to open on a constitutional referendum that he was pushing ahead even after the Supreme Court and the attorney general said it was illegal.
Coups were common in Central America for four decades reaching back to the 1950s, but Sunday's ouster was the first military power grab in Latin America since a brief, failed 2002 coup against Chavez. It was the first in Central America since military officials forced President Jorge Serrano of Guatemala to step down in 1993 after he tried to dissolve Congress and suspend the constitution.
"We thought that the long night of military dictatorships in Central America was over," said Costa Rican President Oscar Arias, who sat beside Zelaya at a news conference.