Pakistani security personnel gather outside the Jinnah International Airport after the militants' assault in Karachi. (AFP photo)
Ten militants were among the dead, officials said, as Pakistan's biggest city witnessed a return of the kind of spectacular offensive waged before by the Tehreek-e-Taliban Pakistan (TTP) during an insurgency that has claimed thousands of lives.
The attack at Karachi's Jinnah International Airport began just before midnight Sunday and around dawn, the military said that all 10 attackers had been killed.
Some of the gunmen were dressed in army uniform, as authorities put their mangled bodies, assault rifles, grenades and rocket launchers on display for the press. At least three blew up their suicide vests, witnesses said, and one head on display was decapitated.
But after authorities initially declared the airport cleared around dawn, an AFP reporter witnessed fresh gunfire break out inside the airport -- where explosions and fires had erupted during the night -- prompting security forces to relaunch the operation.
"The attack is over and we have cleared the area of all militants," a spokesman for the paramilitary Rangers, Sibtain Rizvi, told reporters later after nearly 12 hours of fighting in all.
The bodies of the 18 victims of the Taliban assault -- including eight airport security guards and four workers from Pakistan International Airlines (PIA) -- were taken to a Karachi hospital where another 26 wounded people were being treated, a hospital official said.
PIA spokesman Mashoor Tajwar said no airline passengers were caught up in the incident.
"None of the passengers were trapped in the building, we had diverted all the flights to Lahore and Nawabshah," he told AFP. Pakistan's Civil Aviation Authority said normal flight operations would resume at Karachi on Monday afternoon.
Pakistani troops take position with an armored vehicle at the Karachi airport terminal after the terrorist attack.(AFP photo)
'Just the beginning'
The TTP said the brazen attack was in revenge for its late leader Hakimullah Mehsud, who was killed in a US drone strike in November.
TTP spokesman Shahidullah Shahid also dismissed the Pakistani government's recent offer of a new round of peace talks as a ruse, and promised more attacks to come.
"Pakistan used peace talks as a tool of war," he told AFP.
"We have yet to take revenge for the deaths of hundreds of innocent tribal women and children in Pakistani air strikes.
"It's just the beginning, we have taken revenge for one (Mehsud), we have to take revenge for hundreds."
Talks to end the TTP's bloody seven-year insurgency in Pakistan have been underway since February, after Prime Minister Nawaz Sharif returned to power last year, but little clear progress has resulted.
The assault will raise fresh concerns about Pakistan's shaky security situation, and questions about how militants were able to penetrate the airport, which serves one of the world's biggest cities.
"The federal government is not mentally, psychologically and ideologically prepared to take action against the militants," said political and defence analyst Hasan Askari, who said that Sharif's peace drive looked in bigger doubt than ever.
"If the government still insists on dialogue with the militants, then they will run into difficulties with the military," Askari warned.
'Thank God I am alive'
Officials said the gunmen entered from two sides of the airport at around 11pm on Sunday -- the terminal used for the hajj pilgrimage to Mecca, and an engineering section close to an old terminal that is no longer in use.
An AFP reporter witnessed three huge blasts as suicide bombers detonated their explosives.
Smoke was seen billowing from the airport as fires raged close to planes parked on the runway, while militants clashed with the airport's security force who were backed by police, paramilitary squads and elite commandos.
Taliban militants have carried out a series of similar raids since rising up against the Pakistani state in 2007.
In 2011, Taliban gunmen attacked the Mehran naval base, which lies close to the Karachi airport, destroying two US-made Orion aircraft and killing 10 personnel in a 17-hour siege.
The group also carried out a raid on Pakistan's military headquarters in the garrison city of Rawalpindi in 2009, leaving 23 dead including 11 troops and three hostages.
The latest trouble came with tensions already high in Karachi over the arrest in Britain of the exiled leader of Pakistan's MQM party, which dominates politics in the vast city -- Pakistan's economic hub and main port through which NATO has long shipped supplies to Afghanistan.
Watch: Seige at Karachi airport ends, 24 dead