KABUL—The Quran burning by a Florida church, which sparked three days of deadly rioting in Afghanistan, poses new dangers for the U.S.-led war effort against the Taliban, coalition commander U.S. Gen. David Petraeus warned in an interview.

Gen. Petraeus, who commands some 150,000 U.S. and allied troops here, spoke after Afghan rioters angered by reports of the sacrilege sacked the United Nations compound in the city of Mazar-e-Sharif, killing seven foreigners, and went on a lethal rampage in the southern city of Kandahar,...