TEGUCIGALPA, June 29 (Reuters) - Honduras came under pressure on Monday to reinstate ousted President Manuel Zelaya as leftist Latin American agreed to withdraw envoys, Washington said the ouster was illegal and protesters took to the streets.

Police in the Honduran capital fired tear gas at stone-throwing supporters of Zelaya, who was toppled in an army coup on Sunday.

Some 1,500 protesters, some of them masked and carrying sticks, taunted solders and burned tires just outside the gates of the presidential palace in a face-off with security forces.

Zelaya, a leftist, was detained and sent into exile in a dispute over his push to extend presidential terms. The coup is Central America’s biggest political crisis in decades.

Left-wing Latin American leaders led by Venezuelan President Hugo Chavez announced at a meeting in Managua, capital of neighboring Nicaragua, that they would withdraw their ambassadors from Honduras in protest at the coup.[nN29356272]

President Barack Obama said the United States viewed the ouster as "not legal" and said his government would work with the Organization of American States and others to reinstate Zelaya. The coup has presented Obama with a test as he seeks to mend the battered U.S. image in Latin America.

Honduras, an impoverished country of 7 million people, is a major coffee producer — and is expected to export some 3.22 million 60-kg bags in the 2008-2009 harvest season. But there were no immediate signs that output or exports were affected as ports and roads remained open.

WEEK OF TENSIONS

The coup followed a week of tension when Zelaya, a Chavez ally who took office in 2006, angered the Honduran Congress, Supreme Court and army by pushing for a public vote to gauge support for changing the constitution to let presidents seek re-election beyond a single four-year term.

Before he could hold the poll on Sunday, the Honduran military seized Zelaya and flew him to Costa Rica in Central America’s first successful army coup since the Cold War era of dictatorships and war in the region. The Supreme Court, which last week overruled Zelaya’s attempt to fire the armed forces chief, said it had told the army to remove the president.

"We cannot allow a return to the past. We will not permit it," said Chavez, a champion of Latin American socialism who survived an attempted army coup in 2002 and who has put his troops on alert in case Honduras moves against his embassy.

Roberto Micheletti, named by Congress within hours of the coup as interim president until elections due in November, imposed a curfew for Sunday and Monday night. Micheletti said no foreign leader had the right to threaten Honduras.

Pro-Zelaya protesters railed against the conservative wealthy class that traditionally ran Honduras, and much of Central America, after independence from Spain in the 19th century.

"We are going to be here until President Zelaya returns. Micheletti is the president of the rich and powerful who own this country," a 22-year-old electrician who gave his name only as Kevin, said at a protest outside the presidential palace.

Bolivia’s Evo Morales and OAS Secretary General Jose Miguel Insulza were due to join the group for talks later on Monday.

ANTAGONIZED RULING ELITE

Zelaya, 56, is a logger and rancher who was originally close to Honduras’ ruling elite but then threw his lot in with Chavez’s regional bloc and has steered the country leftward. His close alliance with the Venezuelan leader, and his efforts to lift presidential term limits, upset the army and the conservative elite.

The ousted president said democracy was at stake.

"If force is going to be used to impose governments then democracy as a system of government is going to disappear. Everything that is supposed to be an achievement of the 21st century is at risk in Honduras," he said.

Honduras, an impoverished coffee, textile and banana exporter with a population of 7 million, had been politically stable since the end of military rule in the early 1980s. Following the coup, there was panic-buying in stores and many people drew out cash or closed businesses.

Disruption to the coffee industry is less likely because the current harvest season is drawing to a close and Honduras only has a few hundred thousand bags left to export. But the longer term outlook for the industry was more uncertain. [nN29384653]

Hondurans are divided over the crisis. Recent polls show overall support for Zelaya has dropped to around 30 percent in recent months.

Honduras was a U.S. ally in the 1980s when Washington helped Central American governments fight Marxist rebels and the United States still keeps some 600 troops at a Honduran base used for humanitarian and disaster relief operations. (Additional reporting by Gustavo Palencia in Tegucigalpa, Sean Mattson in Managua, Arshad Mohammed and Matt Spetalnick in Washington; Writing by Alistair Bell, Editing by Frances Kerry)