President Donald Trump’s inclusion of Iraq in the temporary ban on foreign nationals entering the U.S. has alarmed American diplomats who warn it risks upending delicate military, political and business ties at a time when Islamic State is on the cusp of defeat in the country.

The backlash over the executive order intensified on Sunday with Iraqi lawmakers calling on their own government to retaliate by banning U.S. citizens from entering Iraq. Influential Iran-backed Shiite militias, which are helping fight the Sunni extremists...