"Today, the American soldier is in danger, tomorrow the European soldier could be in danger," Rouhani said, according to a translation by The Associated Press. He did not elaborate on what this could mean in practical terms.
The Iran nuclear deal was signed in 2015 by the European trio, the United States, China and Russia. It sought to curb Tehran's nuclear program in return for sanctions relief.
However, President Donald Trump pulled out of the agreement in 2018, saying it was a bad deal signed by his predecessor, President Barack Obama.
Let our news meet your inbox. The news and stories that matters, delivered weekday mornings.
Iran claimed the U.S. reversal meant it was justified in lifting the limits imposed by the deal. The European powers disagree, and this week activated the deal's formal dispute mechanism. This means that if no solution can be reached, Iran could see previous United Nations sanctions reimposed.
The Europeans have so far resisted Trump's calls for them to follow him in ditching the deal. However, on Tuesday, British Prime Minister Boris Johnson did suggest that it should be replaced with a "Trump deal."
A former Trump administration official said Wednesday that the U.K. in particular should follow Washington, given that Brexit would see it leaving the European Union at the end of this month.
"The question for Prime Minister Johnson is, as you are moving toward Brexit ... what are you going to do post-Jan. 31 as you come to Washington to negotiate a free trade deal with the United States?" Richard Goldberg, who until last week was a U.S. National Security Council official working on Iran, told the BBC.
"It's absolutely in his interests and the people of Great Britain's interests to join with President Trump and the United States, to realign your foreign policy away from Brussels," said Goldberg, currently of the Washington-based Foundation for Defense of Democracies, which advocates a hard line on Iran.
This triggered retaliatory missile strikes on U.S. positions in Iraq, and shortly afterward Iran accidentally shot down a Ukraine International Airlines plane killing all 176 people on board.
Iran's admission that it was responsible has triggered days of angry protests and clashes around the country of 82 million, with initial anger around the jet morphing into a wider anti-government sentiment.
Speaking in New Delhi on Wednesday, Iranian Foreign Minister Mohammed Javad Zarif acknowledged his country's people were misled.
"In the last few nights, we've had people in the streets of Tehran demonstrating against the fact that they were lied to for a couple of days," he said, also praising the military for being "brave enough to claim responsibility early on."
He said he and Rouhani only learned Friday that a missile had downed the plane. Iran's paramilitary Revolutionary Guard, which shot down the aircraft, knew immediately afterward its missile downed the airline.
The Guard is answerable only to the nation's supreme leader, Ayatollah Ali Khamenei, who is expected to preside over Friday prayers in Iran for the first time in years over anger about the crash.
Alexander Smith is a senior reporter for NBC News Digital based in London.