“The Americans had sent a message through nearly all European leaders that they are ready to negotiate,” Mr. Rouhani said, according to his website. “The U.S.’s request was for bilateral talks, meaning the two presidents negotiate with each other, and we had rejected this many times.”

He said Iran was willing to negotiate with the United States as part of a meeting with the other members of the 2015 nuclear agreement — Britain, China, France, Germany and Russia.

“The German chancellor and the U.K. prime minister and France’s president were all in New York and they were all insisting that this meeting happen and the U.S. saying it would lift all sanctions,” Mr. Rouhani said.

He said they had discussed which sanctions would be lifted and in what order, and that “the U.S. government said very clearly that it would lift all sanctions.”

But Mr. Rouhani said that “the optics of this were not the kind of optics that would be acceptable to us.”

Such a meeting, he said, would mean that Iran would have been negotiating with the United States “in the atmosphere of maximum pressure and sanctions,” which Mr. Rouhani has repeatedly said he would not do.

The spokesman for Iran’s United Nations Mission, Alireza Miryousefi, elaborated on Mr. Rouhani’s response in his own Twitter account, saying that the Iranian president had insisted that the United States would “first have to create the proper environment by removing the poisonous atmosphere of sanctions.”