ISLAMABAD: Afghanistan has endured a month of relentless attacks claimed by the Taliban and a rival Islamic State affiliate, capped by Saturday’s assault in which a Taliban suicide bomber driving an ambulance filled with explosives struck in the heart of Kabul, killing more than 100 people.

The usually quiet winter fighting season has been shattered by the brutality and frequency of the attacks, including a late December Islamic State assault on a Shiite Muslim cultural center in the capital that killed more than 40 people.

The attacks brutally underscore the weaknesses of Afghan security forces more than 16 years after the U.S.-led invasion toppled the Taliban, and raise questions about President Donald Trump’s strategy for winning America’s longest war.

Who is doing this?

The Taliban have been waging an insurgency since they were driven from power by U.S. and Afghan forces after the Sept. 11 attacks. In recent years they’ve seized districts across the country and carried out near-daily attacks, mainly targeting security forces and the U.S.-backed government.

The Islamic State affiliate emerged in 2014, as the U.S. and NATO were winding down their combat mission, and has clashed with both Afghan forces and the Taliban. The group consists largely of Uzbek militants driven out of Pakistan and disillusioned former Taliban fighters. They bear particular animosity toward Afghanistan’s Shiite minority, which they view as apostates deserving of death.

Both groups want to overthrow the Afghan government and drive out foreign forces, but the Taliban have a more narrow focus on Afghanistan. They have met with Afghan officials in the past and say they are open to direct peace talks with the United States, an offer Washington has refused. The more radical IS views Afghanistan as a province in a worldwide Islamic caliphate headquartered in Syria and Iraq.

Both groups hope their attacks will “delegitimize” the government and “create a distance” between the authorities and the people they rule, says Andrew Wilder, Asia Programs vice president at the U.S. Institute of Peace.

Why can’t they stop it?

Afghanistan’s special forces have distinguished themselves with high-profile raids, some carried out alongside their U.S. counterparts. But other units, including many of those charged with securing areas after the insurgents have been driven out, are notoriously corrupt and incompetent.

This is in part a legacy of the 2001 invasion, when U.S.-led forces quickly cobbled together an Afghan army and police force from an array of ethnic and tribal militias, many of which had fought each other in the 1990s. Today the different units have widely varying loyalties and abilities.

Training is often hurried, with many fighters rushed to the front lines after less than two months. Hundreds of soldiers and police have gone home on leave and never returned, with many still getting paid because they are falsely registered.

To make matters worse, the Taliban have become adept at infiltrating the ranks of Afghan forces, allowing them to carry out so-called insider attacks and to further pry open the gaps in security.

“These groups stage these attacks because they can,” said Michael Kugelman, deputy director of the U.S.-based Wilson Center’s Asia Program. “Security measures are often lax in Afghan cities, Afghan intelligence-gathering capacities are poor, and the terrorists are clever.”

Wilder says another factor is the redeployment of U.S. intelligence, reconnaissance and surveillance assets from Afghanistan to the war against IS in Iraq and Syria. Recent victories against the extremists in those two countries could allow those assets to go back to Afghanistan.

Can the West do more?

The war in Afghanistan has bedeviled three U.S. presidents, none of whom were able to find a way to stabilize the country and bring troops home.

In August, Trump announced a new strategy, based on sending more troops and ramping up pressure on the Taliban to force them into talks with the government. His speech gave Afghan forces a temporary morale boost, but little has changed on the ground.

Analysts say the government must convince Afghans that it can protect them and provide some semblance of good governance. One major obstacle is the tense power-sharing arrangement that emerged after the disputed 2014 elections between President Ashraf Ghani and his erstwhile rival, Chief Executive Abdullah Abdullah.