The United States invaded Afghanistan along with allied forces in 2001 shortly after the 9/11 terror attacks and has been there ever since, before the impending withdrawal this year of the last American troops.
AP photographers have also been there every step of the way, documenting for the outside world the protracted conflict and occupation over the course of two decades, and now the unexpectedly chaotic departure as the Taliban swiftly reassert control over the country.
As is the case with any war, many of the images that emerged were of death and destruction, pain and suffering.
In Kandahar, bloody bank notes covered the bare torso of a dead insurgent after police found them in his pocket following an attack on the former intelligence headquarters and a shootout with security forces.
Aboard a helicopter on a medevac mission, two U.S. army soldiers treated a member of the Afghan National Army who was wounded by gunfire during an assault in the Taliban stronghold of Marjah.
And in a village in the southern province of Zabul, a soldier of the 4th Infantry Regiment frisked an Afghan man in his house during a search operation
But other photos portrayed day-to-day human existence, as people tried to go on with their lives even as the gunfire and bomb blasts never ceased.
On a hillside overlooking Kabul, boys chased each other and kicked a soccer ball across a dirt field.
At an open-air market, a livestock merchant displayed a flock of sheep he brought for sale ahead of the major Islamic holiday Eid al-Adha.
And at a store lined with dozens of blue burqas, a woman waited in a changing room to try out one of the head-to-toe-covering garments.
There were also signs of attempts to strengthen society and weak governmental institutions.
The hollowed-out shell of the Kabul Theater in the capital became a beacon of hope for more than 400 students, even though it still lacked electricity or running water. Two young girls, who would have been barred from going to school under the previous Taliban rule, sat awaiting class as sunlight streamed through windows without panes.
Villager girls gazed at U.N. workers unloading ballot kits from a helicopter in a remote northeastern area where an airlift was the only way to deliver materials for the country’s first direct presidential vote.
Afghan policemen held out their arms to simulate weapons during a training session with U.S. soldiers outside Kandahar.
And newly trained female officers in crisp, dark uniforms sat at the front of their graduating class in a ceremony at the National Army’s training center in Kabul.
Such attempts to remake Afghanistan are now thrown into doubt with the ascendant Taliban again. The group says it will govern in a more moderate fashion than before, but many people fear a return to the harsh rule of the 1990s when women were largely confined to their homes, TV and music were banned and authorities mutilated or publicly executed people suspected of crimes.
Journalists who covered the last 20 years in the country, both Afghans and foreigners, did so at considerable personal risk.
In the AP family, photographer Emilio Morenatti lost his left leg to a roadside bomb in 2009, and five years later, photographer Anja Niedringhaus was shot dead by a policeman in an attack that also seriously wounded correspondent Kathy Gannon.