The presidents of Nicaragua and Iran promised to battle poverty and work against "common enemies" on Sunday, as Iran's hard-line leader made the second of three Latin American stops aimed at courting allies in his standoff with Washington. But unlike Venezuelan counterpart Hugo Chavez, who railed against US imperialism during President Mahmoud Ahmadinejad's visit on Saturday, Nicaragua's Daniel Ortega took a less confrontational position, focusing his remarks on how Iran and Nicaragua should work to help the developing world. Ortega spoke of "constructive agreements to combat hunger, unemployment and poverty." Ahmadinejad said both leaders "want justice and progress" for the entire world. "Our two counties have common interests, enemies and goals," Ahmadinejad said. "We may be far apart, but we are close in heart." The two presidents announced plans to open embassies in each others' countries. They previously had only limited ties through Iran's embassy in Mexico City. "I'm sure this won't be the last visit" by Ahmadinejad to Nicaragua, said Ortega's foreign minister, Samuel Santos. After appearing with Ortega, Ahmadinejad drove through a poor, trash-strewn neighborhood in the Nicaraguan capital of Managua, where barefoot children on their parents' shoulders, waved flags from Ortega's Sandinista party. "We are waiting for this delegation to come and give this country economic support," said Ernesto Picado, among the hundreds who lined the streets. Ahmadinejad was in Managua as part of a whirlwind tour of Latin America's newly inaugurated leftist leaders as he seeks allies in the international debate over his country's nuclear program and its alleged meddling in Iraq. On Saturday, he and Chavez pledged to spend billions of dollars (euros) financing projects in other countries in a bid to offset Washington's influence around the globe. Ortega, while pledging close ties to both Ahmadinejad and Chavez, is tempering his anti-US remarks as he tries to maintain friendly relations with Washington, which is wary of his Marxist roots and waged a bloody insurgency against his leftist government during the 1980s. Ortega and Ahmadinejad were scheduled to sign a cooperation agreement later in the day and the Iranian leader also planned to pray at the Nicaraguan capital's Islamic center. On Monday, Ahmadinejad will attend the inauguration of Ecuador's new president, Rafael Correa, and meet with Bolivian President Evo Morales, both outspoken critics of the administration of US President George W. Bush and Washington's policies in Latin America. Venezuela and Iran, both oil-rich nations, had previously announced plans for a joint US$2 billion (â‚¬1.55 billion) fund to finance investments in their own countries, but Chavez and Ahmadinejad said Saturday that the money would also be used for projects in friendly third countries. "It will permit us to underpin investments ... above all in those countries whose governments are making efforts to liberate themselves from the (US) imperialist yoke," Chavez said. Ahmadinejad called it a "very important" decision that would help promote "joint cooperation in third countries," especially in Latin American and African countries. It was not clear if the leaders were referring to investment in infrastructure, social and energy projects - areas that the two countries have focused on until now - or other types of financing. Before his meeting with Ahmadinejad, Chavez said in his state of the nation address that he had personally expressed hope to Thomas Shannon, head of the US State Department's Western Hemisphere affairs bureau, for better relations between their two countries. Chavez said he spoke with Shannon on the sidelines of Ortega's inauguration earlier this week, saying, "We shook hands and I told him: 'I hope that everything improves."' Chavez - a close ally of Cuban leader Fidel Castro whom Washington sees as a destabilizing influence - has pledged billions of dollars (euros) of help to the region in foreign aid, bond buyouts and preferentially financed oil deals. Iran, meanwhile, is allegedly bankrolling militant groups in the Middle East like Hamas and the Islamic Jihad, as well as insurgents in Iraq, in a bid to extend its influence.