KABUL, Afghanistan — Soon after the attacks of Sept. 11, 2001, the United States military’s attention turned to Afghanistan, where Al Qaeda’s leaders were based. The world awaited an invasion that many knew was sure to come.

What nobody knew was that the invasion to rout the Taliban and Al Qaeda would turn into a war that has now stretched into its 16th year — America’s longest.

It has vexed three American presidencies and outlasted a dozen American military commanders.

The war also opened a window into a country where modernity clashed with tribal customs and religious edicts.

On Monday night, President Trump announced a new strategy for the war, bringing with it a possible increase in troop levels and a seemingly open-ended commitment to American involvement.