UNITED NATIONS — The Trump administration barred senior Iranian government officials from entering the United States on Wednesday, just hours after a failed attempt to renew diplomacy with President Hassan Rouhani as he attended an annual gathering of world leaders in New York.

The order followed a new round of American economic penalties against China, Iran’s largest oil customer, to further squeeze the Iranian economy and force Tehran into new negotiations to limit its nuclear and military programs.

Secretary of State Mike Pompeo said the United States was still open to talking to Iran, and hoped to tamp down inflamed tensions after leaders in the United States, Europe and Arab nations blamed Tehran for attacks on oil fields in Saudi Arabia this month.

“We want peace and we want a peaceful resolution,” Mr. Pompeo said during a news conference Wednesday afternoon with President Trump. “In the end, it will be up to the Iranians to make that decision whether they choose violence and hate.”