(CNN) —  

Gunmen who raided the Intercontinental Hotel in Kabul killed at least 18 people during a 12-hour standoff with security forces that ended Sunday, Afghan authorities said.

Of those killed, 14 were foreign nationals and four were Afghans, according to Najib Danish, spokesman for the Ministry of Interior. Four gunmen were also killed by Afghan security forces responding to the attack, he said.

The slain included nine people from Ukraine and one person each from Greece, Germany and Kazakhstan, Kabul Police Chief Salem Ehsas said. The nationalities of two people were not known yet, he said. Ten people were injured, including four civilians, he said.

Afghan security forces went on every floor of the six-story hotel in a clearing operation, said Danish. He said four attackers were involved, but the Taliban released a statement claiming responsibility and saying it was carried out by five assailants.

Security forces near the Intercontinental Hotel after the attack.
Security forces near the Intercontinental Hotel after the attack.
PHOTO: Massoud Hossaini/AP

The attackers were affiliated with the Pakistan-based Haqqani network, according to the Interior Ministry.

The ministry said 153 people – including 41 foreigners – were rescued from the hotel. After the Interior Ministry declared the siege over, TOLO news channel reported that two attackers were still inside the hotel and gunshots were still being heard.

Gunmen attacked the hotel about 9 p.m. Saturday and were still trading fire with Afghan special forces Sunday morning, the station reported. Ambulances raced to the scene during a lull in the shooting, a witness who lives near the hotel told CNN.

Guests try to escape

During the standoff, the hotel’s third floor, site of the kitchen, caught fire, said Nasrat Rahimi, a deputy spokesman for the Interior Ministry.

TOLO showed images of people apparently hanging off balconies, saying they were “desperate guests and staff trying to escape” from the burning hotel.

Ukrainian victims

“Shocked by the tragic news from Afghanistan,” Ukrainian President Petro Poroshenko said in a statement. “Ukrainian citizens, employees of the Ukrainian airline, fell victims of the terrorist attack in Kabul.”

Poroshenko expressed his condolences to the families of the victims.

Pavlo Klimin, Ukraine’s minister of foreign affairs, condemned the attack on Twitter.

“Horrific news from Afghanistan. Strongly condemn terrorist attack in Kabul,” he wrote. “Sincere condolences to the relatives and loved ones of the victims.”

Haqqani network

US Secretary of State Rex Tillerson issued a statement on Sunday condemning the attack.

“The United States stands with the government and people of Afghanistan,” he said. “We remain firmly committed to supporting Afghan efforts to achieve peace, security, and prosperity for their country. Violence like what we witnessed yesterday has no place in Afghanistan or anywhere else in the world.”

The US State Department had warned last week of a possible attack by extremist groups targeting Kabul hotels.

The Afghan Interior Ministry blamed the Haqqani network for the attack. The group is based in the Pakistani tribal area of Waziristan and known for its high-profile attacks on Western targets in Afghanistan. The network maintains close ties to al Qaeda and the Taliban, and seeks to reestablish Taliban rule in Afghanistan.

In 2001, then-US Ambassador Ryan Crocker accused the Haqqani network of a daylong attack against the US Embassy in Kabul.

This month, President Donald Trump announced his administration would suspend aid to Pakistan until the country took more assertive steps to rein in terror organizations, referring to the Haqqani network by name.

Pakistan’s ministry of foreign affairs issued a statement condemning the attack on the Intercontinental in Kabul.

“We reiterate our strong condemnation of terrorism in all its forms and manifestations. In our view, cooperation among the states is important for effectively combating and eliminating the scourge of terrorism,” it said in a statement.

US Ambassador John R. Bass also condemned the attack and commended the security forces’ quick response.

“Such violence has no place here or anywhere in the world,” Bass said.

“Afghanistan deserves peace and security – not deliberate and murderous attacks on innocent civilians,” he said in a statement.

The British ambassador to Afghanistan, Nicholas Kay, also tweeted his condolences, saluting the bravery of the Afghan security forces.

“When it’s over, Kabul will show its resilience again,” Kay said.

Hotel was attacked in 2011

Flames light up the sky in the 2011 attack on the Kabul hotel.
Flames light up the sky in the 2011 attack on the Kabul hotel.
PHOTO: afp/getty images/file

In June 2011, seven Taliban fighters attacked the same hotel over several hours. In the end, all seven, along with 11 other people, were dead.

The InterContinental Hotels Group developed the hotel, which opened in 1969. But the hotel has had no association with the group since the Soviet invasion in 1979, though it continues to use the name without connection to the international company.

CNN’s Ehsan Popalzai reported from Kabul and Susannah Cullinane wrote from New Zealand. CNN’s Daniel Nikbakht, Nadeem Muaddi, Steve Almasy, Mohammed Tawfeeq and Sandi Sidhu contributed to this report.