The firing of rockets toward American diplomatic missions in Iraq after protesters torched the Iranian consulate in Basra raised tensions as the U.S. and Iran vie to shape the country’s next government.

On Sunday, an uneasy calm held after more troops were sent to the southern city and a curfew imposed to restore order following a week of protests in Basra.

Demonstrations...