TEGUCIGALPA, Honduras -- Police and soldiers clashed with thousands of protesters outside Honduras' national palace Monday, leaving at least 45 people injured, as world leaders from Barack Obama to Hugo Chavez demanded the return of a president ousted in a military coup.

President Manuel Zelaya said he would seek to return to his country Thursday and reclaim control of the government. He said he would accept an offer from the head of the Organization of American States to accompany him to Honduras.

Across Latin America, leftist leaders pulled their ambassadors from Honduras and Nicaraguan President Daniel Ortega said El Salvador, Nicaragua and Guatemala would cut trade with neighboring Honduras for at least 48 hours. Venezuelan President Hugo Chavez called for Hondurans to rise up against those who toppled his ally.

"We're ready to support the rebellion of the Honduran people," Chavez said. He later vowed to halt Venezuelan oil shipments to Honduras and called for its soldiers to rise up against "that tyrannical, puppet government."

Protests outside the presidential palace grew from hundreds to thousands, and soldiers and police advanced behind riot shields, using tear gas to scatter the protesters. The demonstrators, many of them choking on the gas, hurled rocks and bottles as they retreated. At least 38 protesters were detained, according to human rights prosecutor Sandra Ponce.

Red Cross paramedic Cristian Vallejo said he had transported 10 protesters to hospitals, most of them with injuries from rubber bullets. Congresswoman Silvia Allaya said she counted 30 injured at a single Tegucigalpa hospital and an Associated Press photographer in another area close to the palace saw protesters carrying away another five injured people. It was not clear how they were hurt.

Officers also briefly detained four journalists from the AP and three from Venezuela-based Telesur, arresting them at their hotel with rifles drawn, loading them in a military vehicle and taking them to an immigration office, where two officials demanded to see their visas. The group was released a short time later.

In Washington, Obama said the United States will "stand on the side of democracy" and work with other nations and international groups to resolve the matter peacefully.

"We believe that the coup was not legal and that President Zelaya remains the democratically elected president there," Obama said.

"It would be a terrible precedent if we start moving backwards into the era in which we are seeing military coups as a means of political transition rather than democratic elections," he added. "The region has made enormous progress over the last 20 years in establishing democratic traditions. ... We don't want to go back to a dark past."

The Organization of American States called an emergency meeting for Tuesday to consider suspending Honduras under an agreement meant to prevent the sort of coups that for generations made Latin America a tragic spawning ground of military dictatorships.

During a meeting of Latin America laeders in Nicaragua, OAS Secretary-General Jose Miguel Insulza offered to accompany Zelaya back to Honduras and work for reconciliation and the restoration of the democratic order.

Zelaya said he would accept the offer and wanted to make the trip Thursday, after attending a meeting of the U.N. General Assembly on Tuesday to seek support from its 192 member nations.

"I am going to ask you to accompany me, you offered, and I accept your offer," Zelaya said, moments after receiving a standing ovation from the gathered leaders.

Honduras' new government, however, was defiant. Roberto Micheletti, named by Congress to serve out the final seven months of Zelaya's term, vowed to ignore foreign pressure and began naming Cabinet members, including a new minister of defense.

"We respect everybody and we ask only that they respect us and leave us in peace because the country is headed toward free and transparent general elections in November," Micheletti told HRN radio.

He insisted Zelaya's ouster was legal and accused the former president himself of violating the constitution by sponsoring a referendum that was outlawed by the Supreme Court. Many saw the foiled vote as a step toward eliminating barriers to his re-election, as other Latin American leaders have done in recent years.

Despite the protests at the palace, daily life appeared normal in most of the capital, with nearly all businesses open. Some expressed relief at the departure of Zelaya, who alienated the courts, Congress, the military and even his own party in his tumultuous three years in power.

"A coup d'etat is undemocratic and you never want to support it, but in the case of this guy and his government, maybe so," said Roberto Cruz, a 61-year-old metalworker.

But Zelaya retains the loyalty of many of Honduras' poor, for having raised the minimum wage and blaming the country's problems on the rich -- despite the considerable wealth he enjoys as a successful rancher.

Farmworker Jesus Almendares, 30, said he was skipping work to protest the coup.

"It's a tremendous shame, yet another proof that the armed forces control the country -- they and the businessmen," he said.

Zelaya was arrested in his pajamas Sunday morning by soldiers who stormed his residence and flew him into exile. A day later, back in suit and tie, he sat beside Chavez and other allies at a Nicaragua meeting of the nine-nation ALBA alliance, which agreed to pull its ambassadors from Honduras and reject the replacement government's envoys.

Zelaya said the coup only proved the need to transform the Honduran system of government, apparently referring to the constitutional changes he had been promoting.

"A lot of times problems like this crisis serve to propel transformation and change," he said.

Recalling his detention, he said his daughter hid under her bed for 35 minutes while masked soldiers burst in to the residence and searched for him. He was on the phone with a media outlet when the soldiers ordered him to drop the cell phone, he said

He said the soldiers were shaking as they pointed their guns because they were "facing the president of the republic, and they knew it."

"I said, I'm not going to drop it. If you have been ordered to shoot, then shoot," Zelaya said.

He said the soldiers simply yanked the phone from his hand.

Venezuela's Chavez told the gathered leaders that "it's the moment to act" to restore Zelaya. "I'll do everything possible to overthrow this gorilla government of Honduras. It must be overthrown," the socialist leader said.

While Obama said Zelaya is still president, U.S. Secretary of State Hillary Rodham Clinton hedged on that point at an earlier news conference, suggesting that both the ousted president and his foes should make compromises.

Asked if the administration would insist that Zelaya be restored to power, she said: "We haven't laid out any demands that we're insisting on, because we're working with others on behalf of our ultimate objectives."

Mexico's government, one of the most conservative in Latin America, joined leftists in denouncing the coup and offered protection to Zelaya's exiled foreign minister. It said late Monday it would withdraw its ambassador.

The president of Latin America's largest nation, Brazil's Luiz Inacio Lula da Silva, said on his weekly radio program that his country will not recognize any Honduran government that doesn't have Zelaya as president "because he was directly elected by the vote, complying with the rules of democracy.".

Coups were common in Central America until the 1980s, 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 military ouster of a Central American president since 1993, when Guatemalan military officials refused to accept President Jorge Serrano's attempt to seize absolute power and removed him.

Honduras had not seen a coup since 1978, when one military government overthrew another.