The United Arab Emirates said on Wednesday that five of its diplomats were killed in a bombing in southern Afghanistan the day before, the deadliest attack to ever target the young nation's diplomatic corps.

The federation of seven sheikhdoms, founded in 1971 on the Arabian Peninsula, said it would immediately fly the nation's flag at half-staff for three days in honor of the dead from the attack Tuesday in Kandahar, which killed at least 11 people.

Meanwhile, the Taliban denied planting the bomb in the Kandahar attack, which also wounded the UAE ambassador to Afghanistan.

Dubai's ruler Sheikh Mohammed bin Rashid Al Maktoum, the UAE prime minister and vice president, said on Twitter that "there is no human, moral or religious justification for the bombing and killing of people trying to help" others.

Abu Dhabi's powerful crown prince, Sheikh Mohammed bin Zayed Al Nahyan, said the attack wouldn't stop UAE's humanitarian efforts. "We will not be discouraged by despicable terrorist acts carried out by the forces of evil and darkness," he said on Twitter.

The Kandahar attack targeted a guesthouse of provincial Gov. Homayun Azizi, who was also wounded in the assault, along with UAE Ambassador Juma Mohammed Abdullah al-Kaabi. The attack killed 11 people and wounded 18, said Gen. Abdul Razeq, Kandahar's police chief who was praying nearby at the time of the blast.

Razeq said investigators believe someone hid the bomb inside a sofa at the guesthouse. He said an ongoing construction project at the guesthouse may have allowed militants to plant the bomb.

"Right now we cannot say anything that who is behind this attack," he told The Associated Press, while adding that several suspects had been arrested.

The attack inside the heavily guarded compound represents a major breach of security, even in Afghanistan, a country long torn by war. Afghan President Ashraf Ghani on Wednesday condemned the attack and ordered a probe into the incident.

The Taliban claimed attacks earlier on Tuesday in Kabul that killed at least 38 people and wounded dozens. But on Wednesday, they issued a short statement blaming an "internal local rivalry" for the Kandahar attack.

The Taliban have denied some attacks in the past that diplomats and security forces later attributed to the group.

The UAE's state-run WAM news agency identified the Emirati dead as Mohammed Ali Zainal al-Bastaki, Abdullah Mohammed Essa Obaid al-Kaabi, Ahmed Rashid Salim Ali al-Mazroui, Ahmed Abdul Rahman Ahmad al-Tunaiji, and Abdul Hamid Sultan Abdullah Ibrahim al-Hammadi.

On the Afghan side, authorities said the dead included two lawmakers, a deputy governor from Kandahar and an Afghan diplomat stationed at its embassy in Washington.

An earlier UAE Foreign Ministry statement said the Emirati diplomats were in Kandahar as part of a humanitarian mission. Authorities said that included laying the foundation stone for the UAE-funded Khalifa bin Zayed Al Nahyan orphanage and to sign an agreement with Kardan University for the UAE to fund scholarships there.

Emirati combat troops had been sent to Afghanistan after the 2001 U.S.-led invasion that toppled the Taliban. The UAE had troops for years as part of the NATO-led mission, and the Gulf federation also trained members of the Afghan armed forces, often winning the support of locals for praying with them in local mosques and respecting their traditions as fellow Muslims.

Multiple daily commercial flights link the countries, with Dubai serving as an important commercial hub for Afghan businessmen. Over the years, Taliban and Afghan officials also have met in Dubai to try to start peace talks.

Although the UAE is only 45 years old, Emirati diplomats have come under attack in the past, felled by assassins' bullets.

Saif Ghubash, the UAE's first minister of state for foreign affairs, died after being shot in an October 1977 attack at Abu Dhabi International Airport, an attack that apparently targeted Syrian Foreign Minister Abdul-Halim Khaddam. Khaddam later blamed the attack on Iraq.

In 1984, the UAE's ambassador to France was assassinated by a gunman who shot him in the head outside his Paris home. A diplomatic club was named in honor of the slain envoy, Khalifa al-Mubarak, in the Emirati capital Abu Dhabi in 2015.

Another Emirati diplomat was wounded in a shooting in Rome in 1984. Reports at the time linked those two attacks to the Arab Revolutionary Brigades, a Palestinian militant group.

