KABUL - Afghan security forces raided the Kabul hideout of militants with suspected links to the weekend attack on President Hamid Karzai, sparking a clash that left at least seven people dead Wednesday, officials said.

An Associated Press reporter at the scene said the two sides traded rocket-propelled grenade and automatic gunfire for several hours before the clash in the capital ended by midmorning. Interior Ministry spokesman Zemerai Bashary described the suspects as "terrorists.''

The suspects were linked to militants who tried to assassinate Karzai during a military parade Sunday, police at the scene said. Karzai survived that attack, but three other people, including a legislator were killed.

The government did not immediately confirm the police officer's account or provide further details of Wednesday's clash. It was due to hold a news conference later Wednesday.

The suspects were holed up inside a mud-brick house in a densely populated area in western Kabul near a popular park, Babur's Garden. Families evacuated the area as explosions reverberated and gunfire pierced the air.

A police officer at the scene said five militants were killed and four others were detained.

Intelligence officials told the AP that two intelligence agents were also killed and two others wounded.

All the officials spoke on condition of anonymity because they were not authorized to speak to the media.

Ahmad Fahim, a journalist for Radio Kalid, said he saw intelligence agents take away three suspects in vehicles.

Afghan security services are under pressure to crack any militant cells in the capital.

The chief of the intelligence service, Amrullah Saleh, told Parliament on Tuesday that his agency knew about the plot to kill the president over the weekend but failed to locate the assailants in time.

The Taliban militia that was driven from power by the U.S.-led invasion of Afghanistan in 2001, claimed responsibility for the weekend attack, which underscored the fragile grip of Karzai's government in the face of an escalating insurgency.

The attack also showed the capital's vulnerability to militants who have long been strongest in the volatile south and east.