An assault by Taliban insurgents on the heart of Kabul's diplomatic and military district has ended after 20 hours, when security forces killed the last of six attackers, the Afghan Interior Ministry said Wednesday.

It was the longest and most audacious militant attack on the Afghan capital in the decade since the Taliban were ousted from power and a stark reminder of the insurgents' strength and reach as Western forces start to return home.

At least 11 civilians were killed, three of them children, and there may be unexploded artillery fired by the insurgents in parts of the city, NATO-led foreign forces said.

The Ministry of the Interior said that four policemen were killed and the Afghan security force toll was expected to rise. Around two dozen people were wounded.

The insurgents had holed up in a multi-story building still under construction and launched their attack early on Tuesday afternoon, firing rockets toward the U.S. and other embassies and the headquarters of NATO-led foreign forces.

Three suicide bombers also targeted police buildings in other parts of the city, but the embassy district assault was the most spectacular.

Afghan security forces backed by NATO and Afghan attack helicopters fought floor-by-floor in the building, which the insurgents appeared to have booby trapped. One or two fighters held out overnight.

The operation has just ended and six terrorists were killed by police, Interior Ministry spokesman Sediq Sediqqi said on Twitter around 20 hours after the first explosions.

The six insurgents were armed with rocket-propelled grenade launchers, AK-47 assault rifles and suicide bomb vests, a Taliban spokesman said, but the amount of time they held out prompted speculation they had hidden weapons and ammunition in the building before the attack.

There was almost certainly either a breakdown in security among the Afghans with responsibility for Kabul or an intelligence failure, said Andrew Exum, fellow at the Center for a New American Security.

Explosions were interspersed with gunfire all afternoon on Tuesday and several rockets landed in the upmarket Wazir Akbar Khan district, near the British and other embassies. One hit a school bus but it appeared to have been empty at the time.

Gunfire continued throughout the night, with residents of soviet apartment blocks near the insurgent hold-out staying indoors with their lights off, as children cried and helicopters flew low overhead.

It would go silent for 30 to 35 minutes and then there were explosions and the sound of heavy machine guns, one Reuters witness said.

Embassies and restaurants frequented by foreigners were on lock-down all evening. The U.S. and British embassies and the NATO-led coalition said all their employees were safe.

Violence is at its worst since U.S.-backed Afghan forces toppled the Taliban government in late 2001, with high levels of foreign troop deaths and record civilian casualties.

The assault was the second big attack in the city in less than a month after suicide bombers targeted the British Council headquarters in mid-August, killing nine people.

In late June, insurgents launched an assault on a hotel in the capital frequented by Westerners, killing at least 10.

A U.S. Senate panel has approved a $1.6 billion cut in projected U.S. funding for Afghan security forces, part of a significant reduction in outlays for training and equipping Afghan army and police expected in the coming years.

(Reporting by Mirwais Harooni, Sanjeev Miglani and Hamid Shalizi; Writing by Emma Graham-Harrison; Editing by Jonathan Thatcher)