Iran's leader got a welcoming bear hug from the Brazilian president, who urged Western nations to drop threats of punishment over the Iranian nuclear program and instead negotiate a fair solution. Brazilian President Luiz Inacio Lula da Silva, who also called for diplomacy to push for peace in the Middle East and ease tensions between Iran, the US and other nations, again defended Iran's right to have a peaceful nuclear program. Commenting after talking privately for three hours Monday with President Mahmoud Ahmadinejad - the first Iranian leader to visit Brazil since pro-US Shah Mohammad Reza Pahlavi came in 1965 - Silva also said Iran should negotiate with the West to find a "just and balanced" solution to concerns over its nuclear program. Ahmadinejad made no promises and defiantly said Iran would try to improve its uranium-enrichment technology if it can't buy enriched uranium abroad. "If the people ask us to produce ourselves, we should do it, and the opportunity we tried to create for the other side will be lost," said Ahmadinejad, who has repeatedly denied allegations by Washington and its European allies that Iran is trying to build atomic weapons. Iran insists its program is aimed only at generating electricity with nuclear reactors. Despite launching ongoing war games that boosted tensions in the Middle East and helped move international oil prices higher, Ahmadinejad told reporters late Monday he has no fears that the US or Israel might attack Iran. "Those countries that you mentioned don't have the courage to do that," Ahmadinejad said. Last week, Iran said it would not send its enriched uranium for further processing in other nations, effectively rejecting a proposal by UN officials to allay worries the Iranians are developing atomic weapons. The fuel rods that would have been produced abroad under the plan can power reactors, but cannot be readily turned into weapons-grade material. Ahmadinejad's visit with Silva was condemned by US Rep. Eliot Engel, a New York Democrat who is chairman of the House Foreign Affairs Subcommittee on the Western Hemisphere. He said Silva made a "serious error" in meeting with the Iranian leader. The session was significant because Silva is a center-leftist viewed by Washington as a counterweight to more strident leftists in South America, such as the leaders of Bolivia and Venezuela who have been firm supporters of Iran. Ahmadinejad planned to head to Bolivia on Tuesday. In addition to having a private lunch with Bolivian President Evo Morales, he was scheduled to inaugurate a hospital and, via video conference, open two milk-processing plants that Iran donated to the poor country. Iran has also donated equipment for a state-run TV station, sold Bolivia 700 tractors made in Venezuela and provided financing for two state-run cement plants. In addition, Iran approved a $280 million low-interest loan for Bolivia that Morales can use as he sees fit, Iran's diplomatic representative, Masoud Edrisi, told The Associated Press in July. The Iranian and Brazilian presidents didn't say whether they discussed Iranian military exercises that started Sunday, adding to Mideast tensions and driving oil prices higher as an Iranian air force commander boasted Iran could deter any military strike by Israel. Ahmadinejad didn't utter the word Israel during his comments, but said Iran wants a Middle East with "prosperity, progress and security for all nations." In the past, he has called for the destruction of Israel, which has voiced concern about Iran's push in Latin America. Commenting on the fate of three American hikers detained in Iran, Ahmadinejad said it is up to the judicial system to determine whether they will be released or punished, although he said he hoped any punishment would not be severe. The Americans were detained after they crossed an unmarked border into Iran while hiking in northern Iraq in July. The US says the three were innocent tourists on an adventure hike and accidentally crossed into Iran. "We are not happy with them making this big mistake. They are now in the hands of our judiciary," Ahmadinejad told reporters. "A judge will decide about their situation. We hope the sanction will not be too heavy." Relatives of the hikers appealed to Iranian authorities to show compassion. "We don't understand why this case remains unresolved with no sign of progress," said the statement from the families of Josh Fattal, Shane Bauer and Sarah Shourd. "We very much hope the authorities will show compassion, as the president said, and release our loved ones. It's been too long."