At least 28 people have died in an attack by Taliban gunmen at Karachi International Airport in Pakistan.

The assault on Jinnah International Airport all but destroys prospects for peace talks between the Taliban and the government of Prime Minister Nawaz Sharif.

The attack began just before midnight when ten gunmen wearing military uniforms shot their way into the airport's old terminal.

Gun battles raged through the night until security forces regained control of the airport at dawn.

Passengers were evacuated and all flights were diverted.

The Pakistani Taliban, an alliance of insurgent groups fighting to topple the government and set up a sharia state, claimed responsibility.

It said it was in response to army attacks on its 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.

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.

Karachi is Pakistan's biggest city and a key hub of business activity, home to a vibrant stock exchange and companies.

However, it is also a violent and chaotic place where Taliban militants and criminal gangs operate freely underground.

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.

By dawn today, the army said the airport had been secured but heavy smoke rose above the building.

Mr Sharif came to power last year promising to find a negotiated solution to years of violence.

This attack also deals a heavy blow to his efforts to attract more foreign investors to revive economic growth and raises questions about security at the country's key installations.