BRASÍLIA  Brazil’s ambitions to be a more important player on the global diplomatic stage are crashing headlong into the efforts of the United States and other Western powers to rein in Iran’s nuclear arms program.

Luiz Inácio Lula da Silva, Brazil’s president, is set to receive Iran’s president, Mahmoud Ahmadinejad, here on Monday in his first state visit to Brazil. The visit is part of a larger push by Mr. da Silva to wade into the seemingly intractable world of Middle East politics, and follows visits in the last two weeks by Israel’s president, Shimon Peres, and Mahmoud Abbas, president of the Palestinian Authority.

But the visit is drawing criticism from lawmakers and former diplomats here and in the United States, who say it could undercut Western efforts to press Iran on its nuclear program, and consequently chill Brazil’s relations with the United States and damage its growing reputation as a global power.

Brazilian officials say the goal of the visit is to strengthen commercial ties between the two countries and help bring peace to the Middle East.