PESHAWAR, Pakistan -- Pakistani security forces cornered the last members of a group of Taliban militants who staged a deadly raid on an airport in the country's troubled northwest, and all five died in the ensuing firefight Sunday, officials said.

Three were shot by the security forces and two others blew themselves up in the nearby village where they had holed up, the officials said. Another five of the militants who attacked the military side of the international airport in Peshawar city on Saturday night with rockets and car bombs were killed during the assault. Four civilians also died and over 40 people were wounded in the initial attack, and a policeman was killed in the final gun battle.

Peshawar is on the edge of Pakistan's tribal region, the main sanctuary for al-Qaida and Taliban militants in the country. The city has frequently been attacked in the past few years, but Saturday was the first strike against the airport, which is jointly used by the air force and civilian authorities.

The airport is the third major military base attacked by the Taliban in roughly the past 18 months, a sign of the militant group's continued strength despite multiple army offensives targeting their tribal sanctuary.

The militants killed Sunday were hiding in an unfinished house in Pawaka village, located about 2.5 kilometres (1.5 miles) from the airport, said Maj. Gen. Asim Saleem Bajwa, the chief military spokesman.

Three of the militants were shot by security forces during a gun battle that lasted at least three hours, said Bajwa. The two other militants detonated their suicide vests when troops broke down the house's gate with an armoured vehicle, he said.

All five militants appeared to be Uzbeks, said Bajwa. The Taliban have been known to co-operate with militants from Uzbekistan in the past. It's unclear whether the five militants killed Saturday night were locals or foreigners.

One policeman was killed and another wounded in the firefight in the village, said Mian Iftikhar Hussain, information minister for the surrounding Khyber Pakhtunkhwa province.

The 10 Taliban militants began their attack on the airport Saturday at about 8:30 p.m. by firing rockets at the wall that surrounds the installation and then detonating two car bombs and an anti-tank mine to try to break through, said the military. The militants, some of whom were wearing suicide vests, were also armed with rocket-propelled grenades, hand grenades, automatic weapons and bags of explosives.

None of the militants were able to enter the airport, said the military. No air force equipment was damaged and no personnel were injured, officials said.

The civilians who were killed and wounded during the attack were from neighbourhoods located next to the airport, said local hospital official Umar Ayub. It's unclear if the casualties were caused by the rockets and bombs used by the militants, or if the civilians were caught in the crossfire when security forces responded to the attack.

Pakistani Taliban spokesman Ahsanullah Ahsan claimed responsibility for the attack by telephone to The Associated Press. He said the attack was carried out by 10 militants, some of whom were killed.

A local from Pawaka informed the police at 7:30 a.m. on Sunday about the presence of the five militants in the village, said Bajwa, the military spokesman. Police formed a cordon around the village, and the army sent in a quick response team that attacked the militants, he said.

The militants asked local residents for shawls to disguise themselves and a car to help them escape, an eyewitness told local Geo TV. He did not provide his name.

Police took two people into custody in the village on suspicion of helping the militants after the operation was over, said Peshawar police chief Imtiaz Altaf.

The airport in Peshawar, which was closed after the attack Saturday night, reopened on Sunday, said Hussain, the information minister.

The two other major military bases attacked by the Pakistani Taliban in the last 18 months include Kamra air base near the capital, Islamabad, and Mehran naval air base in the southern city of Karachi.