Effective bureaucracies know who their employees are and honor their payment contracts. Advancing these capabilities presumes confidence that the state will continue to exist, which as a definitional matter is not assured in fragile states. We report results from a randomized evaluation of a major Afghan government initiative to modernize its payment system. The reform, which required teachers to biometrically register and receive salary payments via digital payments both made employees more legible to the state and significantly reduced delays. The reform also improved educational outcomes and increased formal financial inclusion for employees. The benefits were not immediate – highlighting the importance of long time-horizons – and took longer in rural and more contested areas. The reform was also implemented with higher quality in districts both where citizens were confident that the government would prevail against the Taliban and where there was a relative consensus about that fact. The results indicate that public confidence in future stability is an important complement to investments in basic state capacity in fragile settings.