Although the relationship between natural resources and civil war has received much attention, little is known about the underlying mechanisms. Controversies and contradictions in the stylized facts persist because resource extraction is treated as exogenous while in reality fighting affects extraction. We study endogenous fighting, armament, and extraction method, speed and investment. Rapacious resource exploitation has economic costs, but can nevertheless be preferred to balanced depletion due to lowered incentives for future rebel attacks. With private exploitation, rebels fight more than the government if they can renege on the contract with the mining company, and hence government turnover is larger in this case. Incentive-compatible license fees paid by private companies and mining investment are lower in unstable countries, and increase with the quality of the government army and office rents. This implies that privatised resource exploitation is more attractive for governments who have incentives to fight hard, i.e., in the presence of large office rents and a strong army. With endogenous weapon investments, the government invests more under balanced than under rapacious or private extraction. If the government can commit before mining licenses are auctioned, it will invest more in weapons under private extraction than under balanced and rapacious nationalized extraction.