Men carry the coffin of a victim of the fake-ambulance attack in Kabul. — Photograph: Rahmat Gul/Associated Press.

KABUL, AFGHANISTAN — With U.S. troops surging into Afghanistan, Taliban militants challenged a new and inexperienced U.S. president with an escalating campaign of bombings that illustrated the difficulties of winning the war.

The year was 2009, the president was Barack Obama and the cheap and devastating Taliban tactic was the roadside bomb, which quickly became the No.1 killer of both U.S.-led coalition forces and Afghan civilians.

Nearly a decade later, with President Trump renewing the war effort by sending thousands more troops and expanding their combat mission, Afghanistan is experiencing another grim increase in insurgent violence with three major attacks in Kabul that killed at least 136 people within a span of 10 days.

The latest came on Monday when five militants attacked an Afghan army unit guarding the country's main military academy, killing at least 11 soldiers and wounding 16 others, officials said.

The attack in Kabul, for which Islamic State claimed responsibility, began before dawn and sparked a gun battle that continued for several hours. The capital's weary residents awoke to more carnage on a day that had been declared a holiday to mourn victims of the last bombing — less than 48 hours earlier, when a Taliban assailant blew up a car bomb disguised as an ambulance outside a hospital, killing at least 103 people.

“It's similar to what happened during the Obama surge, that instead of confronting NATO forces on the battlefield they opted for these low-cost terrorist attacks, and they have been very effective,” said Haroun Mir, a political analyst in Kabul.

“It is becoming obvious that the insurgents, with three or four attackers, are capable of paralyzing the capital,” Mir said.

Every attack now seems to come more quickly than Afghans can recover from the one before. A week before the hospital bombing, a handful of Taliban gunmen raided the Intercontinental Hotel, a landmark in the capital, and killed 22 people, including four U.S. citizens.

The last time Afghanistan endured a week this deadly was barely three months ago, when more than 200 soldiers and civilians were killed, including at least 50 in an Islamic State-claimed attack on a Shiite mosque in Kabul.

Violence in Afghanistan used to take a breather in winter, when cold conditions made it more difficult for insurgents to move back and forth across the border from their havens in Pakistan. But 16 years after the U.S.-led military invasion toppled the Taliban, the increasingly unrelenting pace of bombings has damaged Afghans' faith in their government and raised questions about Trump's strategy to stifle the militants.

In boosting the U.S. troop presence to 15,000 from 11,000 and giving U.S. commanders greater authority to strike militants, Trump implicitly endorsed the idea that Taliban insurgents could be defeated on the battlefield — or at least weakened enough that they would be forced to negotiate a truce with the Kabul government.

But that strategy hinges on the performance of Afghan security forces — trained and equipped largely by the U.S. at a cost of about $70 billion since 2002 — who have proved woefully incapable of stopping devastating attacks against supposedly well-guarded targets. The ambulance attacker got past a security checkpoint by claiming he was ferrying a wounded patient; the Intercontinental siege went on for 15 hours and required U.S. troops to respond to assist the Afghans.

The Taliban has shown little regard for civilian lives; analysts say its goal is to weaken the resolve of Afghanistan's foreign backers, mainly the United States, by showing it can strike anywhere and at any time.

“Time is with the Taliban,” Mir said. “They know that Trump is in office for four years, and two years from now there will be another election and another political debate about whether the U.S. should stay in Afghanistan or not. These kinds of attacks show their strength while avoiding confrontation — that's their strategy to overcome the U.S. surge.”

Trump said on Monday that the worsening violence made negotiating with the Taliban a distant prospect.

“Innocent people are being killed left and right, bombing in the middle of children, in the middle of families, bombing, killing all over Afghanistan,” Trump said. “So we don't want to talk with the Taliban. There may be a time, but it's going to be a long time.”

Afghans carry away a body after a car bomb disguised as an ambulance exploded Saturday in Kabul, killing at least 103. The capital has experiencedthree major attacks that killed at least 136 people in 10 days. — Photograph: Wakil Kohsar/Agence France-Presse/Getty Images.

General Joseph Votel, the head of U.S. Central Command who was in Kabul at the time of the ambulance attack, told reporters that the increasing violence “does not impact our commitment to Afghanistan” and that victory was “absolutely” possible.

Since the end of 2014, when the U.S.-led coalition shifted to more of an advisory role and gave Afghan forces responsibility for security, the annual number of “security incidents” recorded by the United Nations Mission in Afghanistan has risen by more than 10%, according to an analysis published on Monday by Thomas Ruttig, co-director of the Kabul-based Afghanistan Analysts Network.

“All parties to the conflict — the Taliban, the Afghan and the U.S. government — are almost entirely focused on the war … and achieving military advantage,” Ruttig wrote.

Under Obama's surge, the number of U.S. troops rose to nearly 100,000 from fewer than 40,000, and the pace of fighting rose at the same time.

“What happened during Obama's surge of 2010 to 2012 could be repeated, that we see a mutually reinforcing spiral of escalation of the conflict,” Ruttig wrote.

The recent attacks also point to a bloody tussle between the Taliban — Afghanistan's largest insurgent group — and supporters of Islamic State, who U.S. officials say number less than 1,000 in pockets of eastern and northern Afghanistan. The tit-for-tat bombings by members of the rival militant groups, Ruttig said in an interview, reflect “something of a competition over who, on the insurgents' side, dominates the war theater.”

In interviews, many Afghans blamed President Ashraf Ghani's 3-year-old government, which they argued is preoccupied with political squabbles and too slow to stamp out corruption that has hollowed out the army and police.

Abdullah Hasanzadah, a 24-year-old who said he lost a friend in the ambulance attack, said he didn't blame individual soldiers or police for the security failures.

“It's a major concern that the leadership is corrupt, and it's their weaknesses that jeopardize our lives,” Hasanzadah said.

Remote parts of Afghanistan have long been outside government control. The Taliban maintains “shadow governors” in many outlying areas, where they collect taxes and settle disputes. As of October the government controlled or held sway over only 57% of the country's 407 districts, according to the Special Inspector General for Afghanistan Reconstruction, a U.S. watchdog.

U.S. officials say the statistics are misleading because most insurgent-controlled districts are sparsely populated, and their strategy has been to provide security in cities and towns where most Afghans live.

But that isn't working, not even to safeguard supposedly fortified military installations. In the last 12 months, militants have infiltrated a major base outside the northern city of Mazar-i-Sharif and killed more than 100 soldiers — a stunning breach that prompted the resignations of Afghanistan's defense minister and army chief — and killed about 50 people at Kabul's main military hospital.

With military targets so often attacked, many civilians said they feel even more vulnerable. Some Kabul residents said they were avoiding crowds and busy streets, restricting their movements and returning home before nightfall.

Omid Azimi, a 19-year-old high school graduate, said he prays each time he leaves the house. He has also begun carrying a piece of paper in his wallet on which he's written a relative's phone number.

“In case I get killed or wounded,” he said, “it would be easy for people to inform my family.”

• Shashank Bengali is the Los Angeles Times' South Asia correspondent, covering a stretch of countries from Iran to Myanmar. He joined the L.A. Times in 2012 as a national security reporter in the Washington bureau. He has reported from more than 50 countries since beginning his career with McClatchy Newspapers, where he served as a foreign correspondent in Africa and the Middle East.In 2016, he shared in the Pulitzer Prize awarded to the Los Angeles Times staff for coverage of the mass shootingin San Bernardino, California. Originally from Cerritos, California, Shashank holds degrees in journalism and French from USC and a master's in public policy from Harvard. He lives with his wifein Mumbai, India.

• Sultan Faizy is a special correspondent to the Los Angeles Times, based in Kabul, Afghanistan. He previously reported for Associated Press and presented for National Public Radio.