A rocket at an Iranian space centre that was to conduct a satellite launch criticised by the United States apparently exploded on its launch pad on Thursday, satellite images show, suggesting the Islamic Republic suffered its third failed launch this year alone.
On Friday, Trump posted on Twitter a photo of what appeared to be the site of a failed Iranian satellite launch, raising questions about whether he had disclosed USA surveillance secrets.
"I wish Iran best wishes and good luck in determining what happened at Site One", the president wrote.
According to images from Planet Labs, a USA private Earth-imaging company, the Iranian satellite exploded while on its launch pad at the Imam Khomeini Spaceport, part of the Semnan Space Centre in the northern province of Semnan.
Last week, Iranian officials announced that Iran would launch three satellites into orbit by the end of this year.
His comment appeared to acknowledge that the image he tweeted while jeering Iran over the failure was an image produced by the government.
Trump, later speaking to reporters, described Iran suffering "a big problem" at the space center.
But Rouhani said on Tuesday that Iran would not talk to the U.S. until it lifts its sanctions on Tehran. He also reimposed crippling financial penalties.
The Iranian Information and Communications Technology Minister, Mohammad Javad Azari Jahromi, posted a photo of himself and the alleged failed satellite on his Twitter account to ridicule Trump's claims.
Trump was asked Friday if he had released classified information by posting the photo on Twitter.
The president told reporters at the White House on Friday evening that he had the authority to release the photo of the launch pad.
Later, Mr Jahromi accompanied local journalists at the Tehran-based space research centre, showing them the satellite.
In previous days, satellite images had shown officials there repainting the launch pad blue.
Analysts suggested the photo may have been taken by an American spy satellite passing over the area.
Tehran still conducts missile tests but has long maintained that the missiles it is developing are conventional and are not designed for nuclear warheads.
If confirmed, it would become Iran's third unsuccessful attempt to send a satellite into orbit, after failed launches in January and February.
A day earlier, President Donald Trump had posted a photo via Twitter of Iran's Imam Khomeini Space Center in Semnan, 219 kilometers (136 miles) southeast of the capital city, Tehran. "Not sure what the political objective of dissemination was", she said.
Trump pulled the US out of the Iran nuclear deal a year ago, while a report from the United Nations atomic watchdog published this week found that Iran continues to stockpile low-enriched uranium beyond the limits outlined in the 2015 deal.
Jahromi message is a response to President Donald Trump's tweet on Friday in which he posted a black-and-white photo that showed the Iranian explosion site including a reported damaged gantry service tower and a downed mobile erector launcher.