Once again in Afghanistan, the Taliban has captured headlines through a spectacular and startling military attack. On April 19, a terrorist explosion rocked a section of Kabul. Early estimates indicate 28 people were killed and approximately 300 wounded. Last September, the extremist Islamic movement temporarily overran the city of Kunduz.

Nevertheless, progress continues. Afghanistan’s President Mohammad Ashraf Ghani personifies democratic change. He was warmly welcomed in Washington last spring. In 2014, there was a peaceful transition of power. Presidential elections were held in April and June. Turnout was high, despite Taliban intimidation and violence.

World Bank veteran Ashraf Ghani won among a field of eight candidates. The national election commission testified that corruption was reduced from the 2009 presidential election, and the UN did a careful audit of votes cast.

In September 2014, a new agreement was signed to continue the U.S. partnership. A major London conference in December highlighted the international coalition aiding Afghanistan.

Previous President Hamid Karzai was a durable survivor but had become increasingly erratic. Late in his tenure, he denounced the alliance with the U.S. This occurred despite the fact that he was the recipient of sizable regular cash payments from the CIA.

During the election, the Taliban mounted hundreds of attacks but no major government installations were struck. By contrast, in June 2013, Afghanistan rebels detonated a car bomb and battled security forces in front of the presidential palace, the most heavily guarded installation in the country.

Long-term ties between Afghanistan and the U.S. have deepened. In a July 2012 visit to Kabul, Secretary of State Hillary Clinton announced a formal alliance between Afghanistan and the U.S. This relationship goes beyond the long-term but limited multilateral effort under United Nations and NATO authority.

As a result, Afghanistan joined 14 other nations in the distinctive category of Strategic Partner of the U.S. These include Argentina, Australia, Israel and Japan. Other partners are notably stronger economically, and more stable politically, than Afghanistan.

The bilateral partnership brings closer cooperation encompassing regular delivery of military equipment, supplies and weapons. This in turn becomes more important as insurgency persists.

After the announcement, Secretary Clinton and President Karzai attended a conference in Tokyo, where donor nations pledged $16 billion in new development assistance. Foreign aid remains important for political leverage as well as economic development.

Progress includes growing participation of women. Notable publicity has been generated by Ascend, an international nonprofit which engages young people in rigorous athletic training. The association’s priority is training a group of young Afghan women in challenging mountain climbing.

Modern technology is spreading steadily. Cellphones and the internet, as well as traditional television, are now features of even isolated communities.

Historical context and accurate analogies are instructive. In Vietnam, insurgents early controlled large areas, and established a remarkable, sustained intelligence and sabotage network. The Taliban has not approached this success — but could yet win. A key indicator is evidence of infiltration of logistics and communications networks.

U.S. engagement is crucial, and goes beyond forces on the ground. The historic Afghanistan involvement of Britain is instructive. Through the 19th century, British military expeditions experienced frustration. However, London eventually was successful through financial aid, limited military leverage and astute diplomacy.

Economic and diplomatic tools remain of crucial importance, even with expansion of military forces. Whatever the formal ties, both Americans and Afghans should recognize the latter ultimately will determine — and face responsibility for — the course of their own country.

— Arthur I. Cyr is Clausen Distinguished Professor at Carthage College and author of “After the Cold War.” Contact acyr@carthage.edu