Men try to escape from a balcony of the Intercontinental Hotel after an attack Sunday in Kabul, Afghanistan.

KABUL, Afghanistan -- Security forces said Sunday that they had killed the last of six Taliban militants, ending a 14-hour overnight siege at Kabul's Intercontinental Hotel that left at least 18 other people dead, including 14 foreigners.

Unofficial reports cited by Tolo TV put the death toll as high as 43. The report could not be confirmed.

The militants, who wore suicide vests, pinned security forces down for almost 14 hours after the attack began about 9 p.m. Saturday. The gunmen roamed the hallways and targeted foreigners and Afghan officials inside the luxury, hilltop hotel.

Some of the guests fled the gunbattle and fire sparked by the assault by shimmying down bedsheets from the upper floors.

The more than 150 people who were rescued or managed to escape included 41 foreigners, said Interior Ministry spokesman Najib Danish. Of those, 10 people were injured, including six security force troops, he said.

Eleven of the 14 foreigners killed were employees of KamAir, a private Afghan airline, Danish said.

Kam Air canceled several flights Sunday, according to Farid Peykar, the company's vice president, who added that operations would be affected for days to come as the carrier tries to attend to the shock and concern of its staff members.

Six of those killed were Ukrainians, said Ukrainian Foreign Minister Pavlo Klimkin, who added that his office was working with Afghan law enforcement agencies "to clarify the circumstances of this terrorist act."

Two Venezuelan pilots for KamAir were among the dead, according to Luis Figuera. He said his brother-in-law, Adelsis Ramos, was killed along with Pablo Chiossone, and that their bodies were identified by another Venezuelan pilot at a Kabul hospital.

A citizen from Kazakhstan also was among the dead at the hotel, according to Anuar Zhainakov, a spokesman for the Kazakh Foreign Ministry.

Afghan security officials confirmed that 34 provincial officials were at the hotel for a conference organized by the Telecommunication Ministry.

Afghan officials said that also among the dead was a telecommunications official from Farah province in western Afghanistan; Waheed Poyan, the newly appointed consul general to Karachi, Pakistan; and Ahmad Farzan, an employee of the High Peace Council, a commission created to facilitate peace talks between the Afghan government and the Taliban and other opposition groups.

The Taliban, usually quick to claim attacks, did not issue a statement declaring its responsibility for the assault on the hotel until 14 hours after the siege began. At least two senior Afghan officials said the country's intelligence agency had received reports that the Haqqani network, a particularly brutal arm of the Taliban, had planned the attack.

"The attack was carried out by #Pakistan based Haqqani Terrorist Network," Javid Faisal, a spokesman for the Afghan government's chief executive, said on Twitter.

Taliban spokesman Zabihullah Mujahid said the insurgents initially planned to strike the hotel Thursday night but postponed it because a wedding was underway there and they wanted to avoid civilian casualties.

He said the attack was aimed at "citizens of occupying nations" and their "Afghan collaborators."

The U.S. embassy had issued a warning on Thursday that "extremist groups may be planning an attack against hotels" in Kabul.

The attack unfolded almost six years after Taliban insurgents launched a similar assault on the property in which 21 people were killed, including nine assailants. Many others were wounded before Afghan authorities, with substantial assistance from international military forces, managed to bring an end to the violence.

Other hotels have also been targeted. The Serena Hotel, a luxury establishment in Kabul, has been struck three times, including an attack in 2014 that killed nine. In that assault, Taliban gunmen hid small pistols in the soles of their shoes to evade heavy security, then entered the restaurant and killed guests at close range, including a well-known Afghan journalist, his wife and all but one of his children. The events led to an unusual apology for what the Taliban called a "mistake."

In 2015, the Park Palace hotel in downtown Kabul was the site of an attack that killed at least 15 people, including one American.

Mumtaz Ahmad, a provincial telecommunication employee for Helmand province, said he was walking from his room to the reception for his group on Saturday night.

"When the elevator door opened, I saw two armed suicide bombers. People were escaping and the attackers were firing at them," he said.

Fire broke out in the six-story hotel as the fighting raged, filling some guest rooms with smoke. Explosions could be heard throughout the standoff. Live TV video showed people trying to escape through windows and from the upper stories as thick, black smoke poured from the building.

The Interior Ministry said it is investigating how the attackers managed to enter the building. It said a private company had taken over security about three weeks ago at the hotel, which is not part of the Intercontinental chain.

During a news conference, Danish said that an initial investigation showed that six insurgents entered the hotel from the northern side and stormed its kitchen. A person or persons inside the hotel might have helped the attackers gain entrance, Danish said, adding that the probe is continuing.

Two of the attackers were killed by special forces on the 6th floor of the hotel.

Capt. Tom Gresback, spokesman for NATO-led forces, said in a statement that Afghan forces had led the response efforts and that no foreign troops were hurt in the attack, according to initial reports.

Secretary of State Rex Tillerson said the United States strongly condemns the attack, adding that Washington "stands with the government and people of Afghanistan. We remain firmly committed to supporting Afghan efforts to achieve peace, security and prosperity for their country."

Neighboring Pakistan also condemned the "brutal terrorist attack" and called for greater cooperation against militants.

Afghanistan and Pakistan routinely accuse each other of failing to combat extremists on their long and porous border.

Afghan forces have struggled to fight the Taliban since the U.S. and NATO formally concluded their combat mission at the end of 2014.

They have also had to contend with a growing Islamic State affiliate that has carried out a number of big attacks in recent years.

The latest Kabul attack comes amid intensifying violence around the country. In the northern province of Balkh, which has been at the center of a recent political showdown with the central government, at least 18 people were killed in an attack by the Taliban late Saturday, most of them members of a local police militia, officials there said.

Nazar Gul Sholgarai, a commander of the local militia, said the men had been lured to a dinner reception where a Taliban infiltrator had paved the way for the attack. He said a delegation had returned with samples of the meat served at the dinner to see whether the men had been poisoned before they were shot.

"The bodies are still lying there, we haven't buried them -- we are chasing after the Taliban footsteps," Sholgarai said. "The Taliban had come on six horses and four donkeys."

Separately, in the western province of Farah, a roadside bomb early Sunday killed a deputy provincial police chief and wounded four other police, according to Gen. Mahruf Folad, the provincial police chief.

The Taliban claimed both attacks.

In the western province of Herat, a roadside bomb struck a vehicle carrying 13 civilians, killing all but one of them, said Abdul Ahad Walizada, a spokesman for the provincial police chief. No one immediately claimed the attack, but Walizada blamed Taliban insurgents, who often plant bombs to target Afghan security forces.

Information for this article was contributed by Rahim Faiez of The Associated Press; by Mujib Mashal and Fatima Faizi of The New York Times; and by Sharif Hassan and Pamela Constable of The Washington Post.