Afghan men carry a victim in Lashkar Gah, the capital of the Helmand province, on Thursday. (Noor Mohammad/Agence France-Presse via Getty Images)

A car bomb exploded outside a bank Thursday in Afghanistan’s restive Helmand province, killing at least 29 people waiting to collect their monthly salaries, the provincial governor said.

Taliban militants asserted responsibility for the attack, part of rising violence in recent months.

In a message emailed to media, Qari Mohammad Yusuf, a Taliban spokesman, claimed that the attack targeted members of Afghan security forces who had come to the bank to pick up their salaries.

Officials said the bomb-rigged car detonated in the parking lot of the New Kabul Bank in the provincial capital of Lashkar Gah, where dozens of people, both civilians and security personnel, had gathered.

The weekend marks the end of the Muslim fasting month of Ramadan and ushers in several days of celebration. The month, normally a time of prayer and reflection, has been marred by bloody attacks across the country that have claimed hundreds of lives.

Hayatullah Hayat, the Helmand governor, said by phone that most of those killed were civilians. He said at least 60 people were wounded.

Soldiers guarding the bank fired their weapons into the air in apparent panic, prompting erroneous reports that gunmen had assaulted the building as well.

Taliban militants previously have targeted banks in Helmand and the eastern city of Jalalabad.

TV images showed a shattered scene of mangled vehicles and body parts strewn around the parking lot.

A spokesman for President Ashraf Ghani, Shah Hussain Murtazawi, said that the Taliban, after “facing defeat in the battlefield, is now targeting the civilians.”

Helmand, a center for opium production, has been the scene of fierce fighting against the Taliban for years, involving British troops, U.S. Marines and Afghan forces.

It has long been considered Afghanistan’s most violent province, and hundreds of Marines died there in battles between 2008 and 2014, when they were pulled out as part of the drawdown of U.S. troops.

In the past few years, the Taliban mounted a resurgence in the province, taking large swaths of the countryside in 2016.

A few hundred U.S. Marines recently returned to Helmand to bolster government forces, and U.S. forces have carried out airstrikes. The Defense Department is finalizing plans to send more troops to Afghanistan to reinforce the 8,400 in the country.

Lashkar Gah repeatedly has come under attack from Taliban forces.

The Taliban and the even more brutal rival militants of the Islamic State group have unleashed and broadened a wave of deadly attacks since the start of the year.

The worsening security situation coincides with increasing political instability brought on by a power struggle in the government and rising frustration among the public about the inability of authorities to address even their most basic concerns.

On Wednesday, in its latest report, the United Nations Assistance Mission in Afghanistan described the security situation in the country as “intensely volatile.”

The U.N. special envoy to Afghanistan, Tadamichi Yamamoto, told the Security Council on Wednesday that an even more dangerous and fragile period for the country could be ahead.