But he backed calls for an independent inquiry into a suspected chemical weapons attack on a rebel-held town in northwestern Syria on Tuesday that Mr Trump blamed on the Damascus regime.
"This man who is now in office in America claimed that he wanted to fight terrorism but today all terrorists in Syria are celebrating the US attack," Mr Rouhani said in a speech aired by state television.
"Why have you attacked the Syrian army which is at war with terrorists? Under what law or authority did you launch your missiles at this independent country?"
Iran and Russia are the closest allies of Syrian President Bashar al-Assad.
They have provided him with military support not only against terrorists like the ISIS and former Al-Qaeda affiliate Fateh al-Sham Front that are targeted by a US-led coalition but also against other rebels they deem 'terrorists' too.
Both governments have defended their Damascus ally against Western allegations that it carried out a chemical weapons attack on the rebel-held town of Khan Sheikhun on Tuesday, killing dozens of civilians.
"According to the United Nations, the Syrian government does not possess chemical weapons," he said.
Mr Rouhani was referring to the UN-supervised destruction of the Damascus regime's chemical arsenal under a 2013 agreement between Washington and Moscow.
On Friday, hours after the US missile strike, Iranian Foreign Minister Mohammad Javad Zarif said the Western allegations were 'bogus'.
He likened them to the claims that Saddam Hussein's regime had weapons of mass destruction which premised the US-led invasion of Iraq in 2003 but which later turned out to be baseless.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)