Although members and supporters of the Islamic State have frequently commented on President Trump and his policies, analysts have been puzzled by the terrorist group’s official silence about him. Mr. Trump had not been mentioned in any of the group’s official media — all frequent venues for criticism or taunting of former President Barack Obama and other world leaders.

More than two months after Mr. Trump was sworn in as president, the Islamic State’s spokesman on Tuesday released the group’s first official statement on him, in an audio recording calling him an “idiot” and deriding his attacks on Muslims, among other claims.

Even then, Mr. Trump was only indirectly insulted rather than called out by name.

“America, you have drowned and there is no savior; you have become prey for the soldiers of the caliphate in every part of the Earth; you are bankrupt, and the signs of your demise are evident to every eye,” the spokesman said, according to a translation by Reuters. “There is no more evidence than the fact that you are being run by an idiot who does not know what Syria or Iraq or Islam is.”

Some terrorism experts have called some of Mr. Trump’s statements and policies — particularly his ban on visas for people from a selection of predominantly Muslim countries — a potential boon to propaganda by the Islamic State, also known as ISIS or ISIL. The group has long asserted that Muslims are victims of discrimination and abuse in the West, and supporters and members of the Islamic State have seized on some of Mr. Trump’s statements as evidence of hostility toward Muslims.