Ortega has been building alliances with countries opposed to Washington - such as Venezuela and Iran - which have money to invest due to high oil prices and are eager to win friends in Latin America.

The former Marxist guerrilla who won power for a second time in January is eager for help to end the blackouts which have damaged his popularity.

The $350m deep-water port on the Caribbean coast is expected to receive funding from Caracas as well as Tehran.

'Friendly countries'

"We will work to combine Iranian investment with other friendly countries," Ortega said. "Venezuela would be ready and willing to take part in an effort like this."

Under the accords, Iran will fund a farm equipment assembly plant, 4,000 tractors, four hydroelectric plants, five milk-processing plants, a health clinic, 10,000 houses, and two piers in the western port of Corinto, Rosario Murillo, government spokeswoman, said.

The signing ceremony, led by Ortega and Hamid Chitchian, Iranian energy minister, came one week after the US ambassador to Nicaragua warned the Central American nation about its increasingly close ties with Iran.

"Iran can be a dangerous partner," Paul Trivelli said. 

The visit of the Iranian delegation came after a trip by Ortega to Tehran in June and a visit to Managua in January by Mahmoud Ahmadinejad, Iranian president.

Last week, Ortega presented poor farmers out a number of tractors delivered to Nicaragua under the Bolivarian Alternative for the Americas scheme of Hugo Chavez, the Venezuelan president, which provides energy and aid on favourable terms mainly to leftist governments.

The company which made the tractors is 51 per cent owned by Iranian investors.