Two large bombs — one triggered by a suicide attacker — exploded near government offices in Kabul, Afghanistan, Tuesday, killing at least 38 people and wounding dozens of others in the deadliest Taliban violence in the city in months.

In southern Afghanistan, another attack at a guesthouse belonging to the governor of Kandahar province killed five United Arab Emirates diplomats and wounded 12.

The United Arab Emirates announced on Wednesday that five of its diplomats were killed in a bombing in southern Afghanistan the day before, one of the worst attacks to 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.

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's 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.

The UAE's state-run WAM news agency identified the 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.

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.

Emirati troops in Afghanistan since 2001

The Kandahar attack targeted a guesthouse of provincial Gov. Homayun Azizia, who was also wounded in the assault, along with UAE Ambassador Juma Mohammed Abdullah al-Kaabi.

The Taliban have denied some attacks in the past that diplomats and security forces later attributed to the group. An attack inside the heavily guarded compound would represent a major breach of security, even in Afghanistan, a country long torn by war.

An earlier UAE Foreign Ministry statement said the diplomats were in Kandahar as part of a humanitarian mission.

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. Multiple daily commercial flights link the countries, with Dubai serving as an important commercial hub for Afghan businessmen.

The Kabul suicide bomber struck about 4 p.m. as workers were leaving a compound of government and legislative offices, said Interior Ministry spokesman Sediq Sediqqi. The second bomb, which was planted in a car, exploded minutes later after security forces had rushed in to help the victims, he said.

Taliban claims Kabul attack

The Taliban, which has been waging a 15-year war against the U.S.-backed government, claimed the attack in the capital.

The 38 dead included civilians and military personnel, and another 72 people were wounded, said Public Health Ministry official Mohibullah Zeer.

Also among the wounded was Rahima Jami, a member of parliament from Herat province in western Afghanistan, said another lawmaker from the province, Ghulam Faroq Naziri.

It appeared to be the deadliest attack in Kabul since July, when two suicide bombers struck during a demonstration held by Hazaras, a Shia Muslim ethnic group, killing 80 people. That attack was claimed by a local affiliate of the Islamic State group.

Fighting in Afghanistan tends to taper off during the winter, when mountain supply routes used by the insurgents are impassable.

President Asharf Ghani strongly condemned the Kabul bombings in a statement from the presidential palace.

Amnesty International said the bombings indicate that "the Taliban are pressing ahead with a gruesome campaign of violence that makes no effort to spare civilian lives."

"Targeting first responders in a car bomb that killed many people that were on the street shows a chilling contempt for human life," said Champa Patel, Amnesty International's South Asia director.

The White House also condemned the attacks, saying of the bombings in the capital: "An attack on Parliamentary buildings and lawmakers is clearly an assault on Afghanistan's efforts to build democratic institutions."

The Taliban also claimed a suicide bombing earlier in the day that killed seven people in Lashkar Gah, the provincial capital of Helmand province in southern Afghanistan, said Gen. Agha Noor Kemtoz, the provincial police chief.

The bomber, who was on foot, attacked a guesthouse used by provincial intelligence officials, he said.

Civilians and military personnel were among the dead, and six others were wounded, Kemtoz added. A car full of explosives was found nearby.