Hugo Chavez, the Venezuelan president, greeted Ahmadinejad at Caracas' main airport and said the two countries plan to set up a plant for producing gunpowder and other components of ammunition.
Chavez said: "Iran is generously transferring technology to us ... two revolutions are giving each other a hand."
He said Iran and Venezuela, which he described as "two heroic nations" will also set up factories to build cars and produce plastics - efforts to be formalised with the signing of accords during Ahmadinejad's two-day visit.
Chavez has become a leading defender of Iran's nuclear programme on the world stage, while Ahmadinejad and other Middle Eastern leaders are backing Venezuela's bid for a rotating seat on the United Nations Security Council, which the US opposes.
"I have already begun to fight imperialists and internal enemies who continue to say that Iran is coming looking for uranium ... to make an atomic bomb," he said.
Iran says its nuclear programme is for peaceful purposes despite Western concerns. Chavez has accused Washington of using the nuclear issue to justify an attack on Iran.
Ahmadinejad on his first visit to Venezuela said that both countries had "thoughts, objectives and interests in common".
"We must be united to be able to make these ideas reality with the aim of achieving justice and peace in the world," he said.
"The distance between our countries may be a bit far, but the hearts and thoughts are very close"
"I'm sure that under the brave leadership of my revolutionary brother, Hugo Chavez, Venezuela will be able to reach all its objectives in a short time.
"The distance between our countries may be a bit far, but the hearts and thoughts are very close."
Iran and Venezuela have signed more than 80 pledges of co-operation since early last year and are set to sign another 20 during Ahmadinejad's current visit, including plans to set up a joint petrochemical company, produce surgical tools and help train Venezuelan iron foundry workers, said Jose Khan, Venezuela's basic industries minister.
Both countries have agreed to set up a $200m investment fund, while Iran has agreed to build 10,000 homes in Venezuela besides setting up factories to produce bricks, cement and bicycles.