VIENNA — Iran said it has built and will activate a third nuclear enrichment facility, ratcheting up tensions with the U.N. on Thursday immediately after its atomic watchdog agency censured Iran for failing to comply with nonproliferation obligations meant to prevent it from developing a nuclear weapon.

“The Islamic Republic of Iran has no choice but to respond to this political resolution,” Iran’s foreign ministry and Atomic Energy Organization said in a joint statement.

The censure by the International Atomic Energy Agency, its first in 20 years regarding Iranian noncompliance, could set in motion an effort to restore sanctions on Iran later this year.

President Donald Trump had previously warned that Israel or the U.S. could launch airstrikes against Iranian nuclear facilities if negotiators failed to reach a deal on Iran’s rapidly advancing nuclear program. A sixth round of Iran-U.S. talks is scheduled to begin Sunday in Oman, and as tensions simmer some U.S. government staffers deemed nonessential and their families have begun leaving the region.

Trump said Thursday he is still urging Iran to negotiate a deal, but that he is concerned a “massive conflict” could occur in the Middle East if it does not.

Trump said he felt it was necessary for his administration on Wednesday to direct a voluntary evacuation of nonessential personnel and their families from some U.S. diplomatic outposts in the Middle East.

“I don’t want to be the one that didn’t give any warning, and missiles are flying into their buildings. It’s possible. So I had to do it,” he said.

Nineteen countries on the IAEA’s board of governors voted for the resolution to censure Iran, according to diplomats who spoke on condition of anonymity to describe the outcome of the closed-doors vote.

The resolution was put forward by France, the United Kingdom, Germany and the United States.

Russia, China and Burkina Faso opposed it, while 11 abstained and two did not vote.

The resolution calls on Iran to provide answers “without delay” in a long-running investigation into traces of uranium found at several locations that Tehran has failed to declare as nuclear sites, according to a draft seen by The Associated Press.

Western officials suspect the uranium traces could provide further evidence that Iran had a secret nuclear weapons program until 2003.

Speaking to Iranian state television after the U.N. agency’s vote, the spokesman for the Atomic Energy Organization of Iran said his agency immediately informed the IAEA of actions Tehran would take.

“One is the launch of a third secure site” for enrichment, spokesman Behrouz Kamalvandi said. He did not elaborate on the location, but the organization’s chief, Mohammad Eslami, later described the site as “already built, prepared, and located in a secure and invulnerable place.”

Another step would be replacing old centrifuges with advanced ones at an underground site at Fordo. “Our production of enriched materials will significantly increase,” Kamalvandi said.

Iran has two underground sites, at Fordo and Natanz, and it has been building tunnels in the mountains near Natanz since suspected Israeli sabotage attacks targeted that facility.

A senior Western diplomat, speaking on condition of anonymity, last week described the U.N. watchdog resolution as a “serious step,” but added that Western nations are “not closing the door to diplomacy on this issue.”

Iranian President Masoud Pezeshkian, who campaigned on reaching out to the West, struck a harder line after the IAEA vote. “I don’t know how to cooperate with the outside world to stop them from doing evil acts and let the people live independently in this country,” Pezeshkian said. “We will continue down our own path; we will have enrichment.”