KENNEBUNK — The American media have a strange attention span. There is much coverage of Syria but little of Afghanistan, where there are more than twice as many U.S. troops as in Syria and Iraq combined. While we search for allies in Syria, in Afghanistan we are joined by NATO allies who are increasing their troop and financial contributions. Why are we still there? What is the Trump administration doing? These issues merit attention.

We entered Afghanistan to destroy al-Qaida after it attacked us in New York. We tried to separate that fight from the war with the Taliban to find an exit. That failed. Al-Qaida is still fighting in Afghanistan alongside the Taliban. Our withdrawal would be a victory for al-Qaida. And the Islamic State is now fighting to hold a place in Afghanistan as well. The need to protect ourselves and our major allies from attacks emanating from Afghanistan remains a fundamental goal of America and our allies. But is some form of success attainable, and why would anyone believe that after 17 years of effort?

I believe success is still possible, although the odds are no better than even. The current U.S. policy is more comprehensive than the past one. It includes building Afghan security forces to take a larger share of the battle and allow eventual drawdown of our forces, Afghan political reform, economic progress and a regional dimension centered on pressuring Pakistan to cease Taliban sanctuaries.

Whether it can succeed remains an open question. However, certain observations are possible. The previous effort to build Afghan security forces was terribly rushed by unrealistic deadlines. Essentially, we tried to triple the force in four years in the midst of a war, and then bailed out. The operation was heavily funded for equipment and facilities, but seriously underresourced in personnel. Training teams barely reached 50 percent of the NATO requirement, to note just one problem.

The current effort is more measured. The success of the Afghan commandos, the one part of the force that’s had adequate mentorship, suggests that better results can be obtained.

Political reform is a must for the Afghan government to win the support of its people. There remain huge problems of corruption. There are also signs of change.

A new civil service commission, led by young reformers, is targeting major centers of nepotism. The Anti-Corruption Justice Center has sent two-star generals and deputy ministers to 10-year jail terms, although it has not yet targeted the most senior levels. A younger generation wants a modern country, and that includes many women now serving as ministers and deputy ministers. Revenue collection has exceeded International Monetary Fund targets for the last four years, and the newest Afghan budget is now a most realistic effort to connect policy to spending.

Reform is critical to the success of creating Afghan security forces where poor leadership and corruption have impeded effectiveness. Here, too, there are signs of change. New corps commanders were appointed last year, promoted from brigade combat commands rather than from politically connected generals. More recently, reform has begun in the Interior Ministry, where a number of senior officials have been removed. Nevertheless, grave problems remain, particularly in the police.

A negotiated peace remains the best solution. We’ve backed new peace offers by Afghan President Ashraf Ghani, yet the Taliban has replied only with increased attacks. We and the Afghan government can seek peace, but we cannot order it.

Nothing guarantees that reform will continue, let alone succeed. Afghanistan is due for parliamentary elections this year and presidential elections in 2019. Security for these elections will be difficult, and fraud remains a risk. Afghanistan is at best only partly along on the road to democracy. Yet the images from the last election, of long lines of women standing in the rain to enter a polling place, or men risking attack to travel to vote, provide a telling demonstration of how much Afghans prefer ballots to bullets for selecting their leaders.

Asking Americans to keep supporting Afghanistan after 18 years is asking a lot. Yet the fact remains that the stakes are high and much of what we need to do is repair our own mistakes of the past. Of the many countries where U.S. forces are today engaged in the struggle with terrorism – Iraq, Syria, Yemen and Somalia – it is in Afghanistan where we retain the most welcoming population and government and the strongest chance of success.