The new constitution of Iraq says:
A) Islam is the official religion of the State and is to be considered a source of legislation. No law that contradicts the universally agreed tenets of Islam, the principles of democracy, or the rights cited in Chapter Two of this Law may be enacted during the transitional period. This Law respects the Islamic identity of the majority of the Iraqi people and guarantees the full religious rights of all individuals to freedom of religious belief and practice.
This constitution was signed by Iraqis, but can anybody doubt that the USA played a large role in bringing it to be, a role beyond toppling the Saddam government?
How can this be legal. No agents of the USA are permitted to take actions respecting the establishment of any religion. The 1st amendment does not just say "In the united states." I would say that US agents must play no role in creating foreign governments which have established churches.
The Iraqis, on their own and soverign, may decide to have an official religion. But they are not on their own here. I have no doubt it was Iraqi desires which led to the introduction of this article, and that the US probably didn't want it.
But the US is required to not just not want it. They are constitutionally forbidden from playing any part in it, I would say. Besides, the whole point of the 1st amendement is it doesn't matter what even the majority of individuals want with regards to religion, they are not to be given their way. It doesn't just say "in the USA." No agents of congress, including the military, may engage in this.
Of course, all this means is somebody could sue in US court that the US government violated the 1st amendemnt. It's not clear what remedy could be granted them.