Militants launched a brazen attack on Karachi’s international airport Sunday night, killing at least 18 people and seizing control of part of the airport in Pakistan’s largest city for more than five hours.

The well-coordinated attack involved 10 assailants who were armed with grenades, rocket launchers and assault weapons, authorities said. Some of them were also said to be wearing suicide vests. They battled Pakistani security forces through the night before all the assailants were slain, officials said.

Several large fires broke out at Jinnah International Airport, but all airline passengers escaped unharmed, according to a Pakistani army spokesman.

But the siege, one of the worst security breaches at a Pakistani airport, is raising serious questions about the country’s ability to protect its major transit hubs amid the persistent threat of terrorism. The attack comes as Prime Minister Nawaz Sharif and the country’s military have been considering a major offensive against the Pakistani Taliban, which has been waging a bloody insurgency.

“This act of terror is unforgivable,” Khawaja Muhammad Asif, Pakistan’s defense minister, told local television reporters. “The state will give an appropriate response to such cowardly acts of terror. Those who plan and those who execute the terrorist attacks will be defeated.”

Pakistani forces secure a wall after suspected militants attacked an airport in Karachi. (Shahzaib Akber/EPA)

In a statement, the Pakistani Taliban claimed responsibility for the attack.

Shahidullah Shahid, a Taliban spokesman, said the attack was in response to both recent Pakistani military airstrikes in northwestern Pakistan as well as the U.S. drone strike in November that killed Hakimullah Mehsud, the former leader of the militant group.

Shahid added the attack should be viewed as a sign that Prime Minister Nawaz Sharif’s efforts to engage the group in peace talks had failed.

“The message to the Pakistani government is that we are still alive to react to the killings of innocent people in bomb attacks on their villages,” said Shahid, adding the attack followed months of intensive planning.

It was unclear how such an assault could occur at what is supposed to be a heavily fortified airport. The attack, which began at 11 p.m. and lasted until dawn, is likely to be another blow to Pakistan’s efforts to lure international business to help its struggling economy.

“I would not want to send any nonmilitary, non-law-enforcement personnel into that area at this moment,” Terrance W. Gainer, a security consultant and former chief of the U.S. Capitol Police, said in an interview. He said U.S. security and anti-terrorism officials would undoubtedly be scrutinizing the attack to learn how it occurred.

Preliminary details

According to preliminary information from Pakistani security officials, the attack began when about five assailants gained access to the Jinnah airport, apparently shooting their way through a gate near the old terminal. At least five others entered separately; they may have blasted their way through a wall near the cargo area, officials said.

Amjad Shah, a Karachi police official, said at least some of the militants were wearing uniforms used by security forces.

Once inside, the militants began lobbing grenades and took up positions near the runway and in the airport’s cargo area. One senior Pakistani intelligence official, who spoke on the condition of anonymity to discuss security issues, said some of the militants intended to hijack a plane but were unsuccessful.

All arriving flights were quickly diverted from the airport, which serves 6 million passengers annually. Three international flights were scheduled to leave between 11 p.m. and 1 a.m., going to Sharjah, United Arab Emirates; Bangkok; and Dubai. But all passengers at the airport were evacuated safely, according to Maj. Gen. Asim Saleem Bajwa, the spokesman for Pakistan’s military and security agencies.

About 90 minutes after the attack began, hundreds of Pakistani army commandos arrived on the scene and began battling the militants.

Hospital officials said that at least 18 people were killed by the assailants — including eight airport security personnel, a Pakistan International Airlines employee, a police sub-inspector and an official with Pakistan’s Civil Aviation Authority.

About 5 a.m Monday, Bajwa reported that the siege had ended after all the attackers were killed. Bajwa said that eight of them were shot and that two blew themselves up once cornered.

Earlier in the night, at least some of the militants had initially been searching for the airport’s fuel storage facility, according to one security official. For much of the night, Pakistani television news stations aired footage of two-story-high flames shooting over the top of aircraft parked near the runway.

The Dawn News channel aired an interview with an airport employee who said he escaped from a maintenance shed by climbing onto the roof.

Abid Qaimkhani, a spokesman for the aviation authority, said that some planes had been hit by gunfire but that none caught fire.

The Karachi airport was expected to reopen around midday Monday.

Recent warning of attack

Karachi is home to thousands of suspected Pakistani Taliban militants, which has made it one of Pakistan’s most violent and volatile cities.

In recent days, security officials had warned of the likelihood of a major terrorist attack in Karachi in response to Pakistani military operations against insurgents in North Waziristan near the Afghan border.

Over the past two weeks, more than a dozen Pakistani soldiers have been killed in attacks near the border. In response, the army has launched airstrikes in the region and has stepped up its shelling of suspected militant strongholds inside Afghan territory. But the army has stopped short of a major ground assault on Taliban strongholds, which some Pakistani officials fear could lead to even more lethal attacks in Pakistani cities.

Jonah Blank, a senior political scientist at the Rand Corp., said in an e-mailed statement to reporters that the Taliban is most likely to blame for the attack.

But Pakistan is home to more than two dozen militant groups, including al-Qaeda, and Blank cautioned that “the list of potential culprits is long.”

In a separate attack Sunday night, at least 20 Shiite pilgrims were killed in the western province of Baluchistan when two suicide bombers struck near the bus they were traveling in, officials said. The attack occurred near Pakistan’s border with Iran.

Aamir Iqbal in Peshawar, Shaiq Hussain in Islamabad, Nisar Mehdi in Nawabshah and Christian Hettinger in Washington contributed to this report.