KABUL—A helicopter from the coalition led by the North Atlantic Treaty Organization fired on and killed three militants on the roof of Kabul's InterContinental Hotel, ending the nearly six-hour siege by gunmen and suicide bombers that demonstrated the Taliban's ability to stage dramatic attacks in Afghanistan's capital.

A spokesman for Afghanistan's Ministry of the Interior said at least seven people, including one policeman, were killed in the attack, and eight others were wounded. The militants had...