Iranian President Mahmoud Ahmadinejad is set to visit Bolivia on Thursday, the first time an Iranian leader has visited the impoverished South American country, to solidify diplomatic ties and sign aid agreements.

Ahmadinejad was in New York on Monday for the U.N. General Assembly meeting and plans to visit Venezuela on Wednesday.

Iran, deeply at odds with the West over its nuclear program, has gained influence in Latin America as anti-U.S. sentiment has risen among leftist leaders such as Venezuela's Hugo Chavez and Bolivia's Evo Morales. Bolivia said the Iranian leader's visit did not imply that La Paz supported an Iranian arms buildup that has been strongly criticized by the United States and other countries.

"We're talking about advances in technology and petrochemistry," government spokesman Alex Contreras told official news agency ABI. "We will not support warmongering and weapons buildup policies."

Earlier this month Bolivia said it was reviving diplomatic relations with Iran, which have been almost nonexistent for the past two decades. However, Bolivia has said that for the time being it does not intend to send an ambassador to Iran.

Iranian Deputy Oil Minister for International Affairs Hossein Noghrehkar-Shirazi was in Bolivia on Monday to negotiate the energy agreements. "(Bolivia and Iran) are friends. We're going to collaborate and work on any matter that allows us to carry out investments," Noghrehkar-Shirazi said through a translator.

He said the two countries are considering joint investments in "drilling and natural gas pipelines" but declined to provide details, saying negotiations are ongoing. Bolivian Government Minister Juan Ramon Quintana said in Washington that Bolivia was also looking at possible Iranian investment in its mining sector.

(Additional reporting by Adriana Garcia in Washington and Sergio Burgoa in La Paz).