The assault on Jinnah International Airport in Karachi, Pakistan's sprawling commercial hub of 18 million people, took place as Prime Minister Nawaz Sharif's government tries to engage Taliban militants in talks to end years of fighting.
The attack began just before midnight when 10 gunmen wearing military uniforms shot their way into the airport's old terminal used mainly for charter and executive flights.
The Pakistani Taliban, an alliance of insurgent groups fighting to topple the government and set up a sharia state, claimed responsibility, saying it was in response to army attacks on their strongholds along the Afghan border.
"It is a message to the Pakistan government that we are still alive to react over the killings of innocent people in bomb attacks on their villages," said Shahidullah Shahid, a Taliban spokesman.
The attack all but destroys prospects for significant peace talks with the government of Sharif, who came to power last year promising to find a negotiated solution to years of violence.
At the airport, gun battles went on for five hours and television pictures showed fire raging as ambulances ferried casualties away. At least three loud explosions were heard as militants wearing suicide vests blew themselves up.
Twitter reaction to the attack was immediate with many sending prayers to those security members who died in the line of duty.
But creating awareness of the event - and the damage and casualties caused as a result - was forefront for Twitterati, with vivid imagery and shocking footage retweeted across the social platform.
By dawn on Monday, the army said the airport had been secured but heavy smoke rose above the building.
"Ten militants aged between 20 and 25 have been killed by security forces," said a spokesman for the paramilitary Rangers force. "A large cache of arms and ammunition has been recovered from the militants."
Pakistan's paramilitary force said that the attackers were ethnic Uzbeks. Pakistani officials often blame foreign militants holed up in lawless areas on the Afghan border for staging attacks alongside the Pakistani Taliban around the country.
"Three militants blew themselves up and seven were killed by security forces," Rizwan Akhtar, the regional head of the paramilitary Rangers, said in televised remarks. "The militants appear to be Uzbek."
Officials said no aircraft had been damaged.
Earlier, officials said all flights had been diverted.
One passenger on board a flight on the Karachi airport runway live tweeted his terrifying ordeal.
Syed Saim A. Rizvi caused quite a stir on Twitter as he congratulated the Pakistan Army for the way in which they handled the situation.
Peace talks between the government and the Pakistani Taliban have failed in recent months, dampening hopes of reaching a negotiated settlement with the insurgency, which continues attacks against government and security targets.
Pakistan's Taliban are allied with but separate from the Afghan Taliban.