A suicide bomber targeted a NATO convoy on the road between the international airport and the U.S. Embassy here in the Afghan capital Tuesday, police and a NATO official said.

It was not clear how many people were killed or wounded in the afternoon attack.

A spokesman for the NATO coalition, Tommy Fuller, confirmed that a coalition convoy came under attack, but he said there were no casualties among the troops. Witnesses said five Afghan ­civilians were killed and more than a half-dozen were wounded.

The attack occurred near a shopping plaza, about 500 yards from the embassy. The blast shook buildings and rattled windows in the capital’s heavily fortified diplomatic enclave, according to news reports. An armored vehicle, part of the NATO convoy, was badly damaged, witnesses said.

Afghan President Ashraf Ghani, left, speaks as his wife, Rula Ghani, listens during a gathering of diplomats and women rights activits at the Ministry of Foreign Affairs in Kabul. (Wakil Kohsar/AFP/Getty Images)

The Taliban asserted responsibility for the attack, which came as government employees were leaving their offices and traffic was heavy during a shortened workday as part of the Muslim fasting month of Ramadan.

A second attack occurred outside the main police station in the capital of the southern province of Helmand. Two civilians were killed and 50 people, including several police officers, were hurt, according to provincial officials.

The attacks came just hours after President Ashraf Ghani said at an event in Kabul that despite growing violence, political instability and the emergence of the Islamic State militant group in some areas of the country, ­Afghanistan will not collapse.

Ghani urged regional powers, including Russia and India, to forge a consensus, however, on how to stabilize his country.

Since assuming office nine months ago, Ghani has focused on improving ties with neighboring Pakistan, where the Taliban leadership is thought to reside. He has also tried to secure monetary aid and weapons for Afghanistan for its fight against the Taliban and other extremist groups.

But Taliban insurgents have stepped up and broadened their attacks despite an unprecedented round of meetings between ­Afghan and Pakistani officials. Ghani hopes that Pakistan can persuade the Taliban to agree to some sort of political negotiation. Many Afghans, however, remain skeptical of Pakistan’s role as an interlocutor.

Last week, Taliban insurgents attacked the Afghan parliament in an audacious daylight assault that forced lawmakers to flee the heavily fortified government installation.

Meanwhile, an official said Monday that 11 Afghan soldiers were killed in a Taliban ambush in a western province that borders Iran, according to the Associated Press. On the same day, six other troops lost their lives during a battle with the Taliban in the southern province of Kandahar.

The Afghan army convoy in Herat province was heading to a neighboring province Sunday when it came under attack, said Hesanullah Hayat, spokesman for the provincial governor, the AP reported.

The western region has experienced increased insurgent activity since the Taliban launched its spring offensive in late April. ­Attacks across the country since then have forced Afghan security forces to spread out, thinning their ranks and leading to an uptick in the number of casualties suffered by the army and the ­police.

But Ghani sounded a defiant note Tuesday, saying, “No one should gamble that, God forbid, Afghanistan will collapse.”

“We have lived for 5,000 years and protected this soil and will give sacrifice for another 5,000 years to protect this soil,” he added.

Ghani urged a regional consensus on stabilizing Afghanistan, warning that security in neighboring nations is linked to peace in his country.

“We are giving sacrifice, and there is a need that the region and all of our neighbors with one voice reach a consensus,” he said. “The governments should learn one fundamental lesson: Instability of a government in one region causes instability in the entire region and the world.”

Najib Mahmoud, a Kabul University professor and political analyst, said Ghani’s push for a regional consensus stems from his frustration with Pakistan over its failure to help in negotiating with the Taliban.

“Contrary to his expectations, fighting has exacerbated, and that is why he is asking for a regional consensus,” Mahmoud said.

Regional countries, as well as the United States, are pursuing contradictory policies in Afghanistan, and a consensus does not look likely, he said.

Also Tuesday, Ghani nominated the first female supreme court justice in Afghanistan’s history. Anisa Rasouli’s confirmation needs parliamentary approval, however, and her nomination has provoked anger among Afghan conservatives.

Ghani said he wanted all his ministers to appoint women as deputies. He has appointed four women as cabinet ministers, fulfilling a campaign pledge to bring more women into government. Recently, he also nominated two women as provincial governors.

Deane reported from Rome.

Read more:

Afghan forces straining to keep the expanding Taliban at bay

After suffering under the Taliban, an Afghan minority faces new threats

Fear of the Islamic State spawns a renegade Afghan militia

Today's coverage from Post correspondents around the world