‘Hearts and minds’ theory contends development aid strengthens community support for counterinsurgents by providing jobs and public goods. Based on field interviews in Kabul, we develop an alternative theoretical framework emphasizing instead the non-pecuniary interests of civilians. In our model, some aid projects are ideologically contentious while others are benign. Given a mix of foreign aid, each civilian supports either the counterinsurgents or rebels, depending on his/her idiosyncratic political preferences. In this setting, greater provisions of aid can actually erode community support. Donors therefore calibrate the mix of foreign aid to appease population groups with relatively strong ideological sensibilities. Correlations from unique Afghan data are consistent with our novel theory. Benign projects are associated with favourable opinions of development, and stronger support for government and counterinsurgents. Contentious aid, by contrast, is accompanied by poor assessments of development efforts and greater support for rebels.