URGENT

Defense Min.: Afghan president safe after fleeing gunfire

Eds: UPDATES with details.

KABUL, Afghanistan (AP) -- Automatic gunfire broke out at a ceremony in Kabul on Sunday, forcing the Afghan president and other dignitaries to take cover.

A Defense Ministry spokesman said President Hamid Karzai, all Cabinet members and foreign diplomats were safe. Two lawmakers were reported wounded.

A Taliban spokesman quickly claimed responsibility for the attack, saying four militants with suicide vests and guns were nearby.

Hundreds of people fled in chaos as shots rang out. It was unclear where the firing was coming from. A live TV broadcast of the event in Kabul quickly cut.

Karzai was escorted from scene, surrounded by bodyguards, in one of four black Landcruisers.

The gunfire broke out as the national anthem ended at a ceremony to mark the 16th anniversary of the victory over the Soviet invasion, which ended in 1992.

TV footage showed a couple of dignitaries slump in their seats as the shooting began. They appeared to be lawmakers.