Brasilia - Iranian President Mahmoud Ahmadinejad obtained Brazil's support Monday for Tehran's controversial nuclear programme as long as it is "for peaceful ends.""We acknowledge Iran's right to develop a nuclear programme for peaceful ends, with full respect for international agreements," Brazilian President Luiz Inacio Lula da Silva said during Ahmadinejad's visit to Brasilia.
Protests met Ahmadinejad on the first leg of a South American tour that was to take him on to Bolivia and Venezuela.
Lula, who unveiled plans for a March visit to Iran, called on Ahmadinejad to pursue further talks "with the countries interested in finding a fair and balanced solution to the Iranian nuclear question."
The US, Britain, France, Germany, Russia and China have been engaged in a halting dialogue with Tehran over its nuclear programme.
Ahmadinejad accused Western countries of encouraging unjustified suspicions against Iran.
His stay in Brazil was marked by protests both on the street outside the Brazilian Foreign Ministry - where he met with Lula - and in Congress, where two legislators showed signs with the words "Holocaust, never again."
Ahmadinejad has repeatedly denied the Holocaust against Jews in Europe and has called for Israel to be wiped off the map.
Several hundred people had already protested the visit Sunday in Rio de Janeiro.
Ahmadinejad is the latest in a series of Middle Eastern leaders welcomed by Lula, including Palestinian National Authority President Mahmoud Abbas and Israeli President Shimon Peres.
Abbas had said in an interview that he hoped Lula would try to convince Ahmadinejad to put an end to Iran's support for the militant Palestinian movement Hamas.
"Iran supports Hamas with money. Hamas' decisions are in the hands of Tehran," Abbas said last week.
Ahmadinejad originally planned to visit Brazil in May but abruptly cancelled the trip shortly before the contested Iranian elections.
Brazil and Iran signed deals for cooperation in the fields of energy - including oil and biofuels - mining and agriculture.
"We defend human rights and our citizens' freedom to choose," Lula said.
He stressed that his government rejects "all acts of intolerance" and terrorism.
Ahmadinejad was to travel Tuesday to Bolivia.