And that is what United States forces are trying to do in Afghanistan, albeit with insufficient resources and support from Washington, where successive presidents have insisted on defining the mission in narrowly counterterrorist terms. The easiest — though far from easy — nation-building efforts are focused on building up the Afghan National Defense and Security Forces.

The regular police and army have been disappointing. The police are corrupt and ineffective, while the army is intent on staying in fixed positions rather than taking the fight to the enemy. The biggest success has been the Afghan Special Operations forces: Despite making up only 7 percent of the military, they have taken the lead in nearly three-quarters of offensive operations.

The international coalition is planning to increase the size of the Afghan Special Operations forces to 30,000 personnel (from about 21,000) — and on Aug. 20, I attended a ceremony at Camp Morehead, southeast of Kabul, to mark the creation of a new corps. The hope is that this larger force, assisted by American advisers and airpower, will be able to take ground from the insurgents that currently control or contest territory where 40 percent of the country’s population lives.

The regular army will be the “hold” force, while the police move from paramilitary duties to regular civilian policing. The coalition is also pouring significant resources into the Afghan Air Force. By 2021, the Afghan Air Force should be able to take over most of the air-support role now played by the United States and allied air forces.

But security forces do not exist in a vacuum; it will be necessary also to reduce corruption in the Afghan government and increase its capacity for effective action. This has proved to be a far more difficult task, with an administration often seemingly paralyzed by infighting between President Ashraf Ghani and the chief executive, Abdullah Abdullah. Northern warlords, meanwhile, have engaged in open fighting.

Officials in Kabul do, however, report a modest thaw in the Ghani-Abdullah feud, which has allowed them to agree on reformers to lead the defense and interior ministries. More important, Mr. Ghani has made headway against the corruption that has served as a potent recruiting tool for the Taliban, thanks to several successful prosecutions of senior officials by the country’s crusading attorney general, Farid Hamidi.

The United States will never achieve any lasting success in Afghanistan unless it can prevail in the inglorious and frustrating business of making Afghanistan’s government work better. These efforts have never received the same level of backing from Washington that combat operations have. The American military has had to take the lead in expanding the Afghan government’s capacity because our civilian agencies have been ineffectual.

Mr. Trump must direct the United States government to do this job better. That is nation-building, but as long as he does it, the president can just call it a “win.”