African governments and international development groups see boosting productivity on smallholder farms as key to reducing rural poverty and safeguarding the food security of farming and non-farming households. Prompting smallholder farmers to use more fertilizer has been a key tactic. Closing the productivity gap between male and female farmers has been another avenue toward achieving the same goal. The results in this paper suggest the two are related. Fertilizer use and maize yields among smallholder farmers in Uganda are increased by improved access to markets and extension services, and reduced by ex ante risk-mitigating production decisions. Standard ordinary least squares regression results indicate that gender matters as well; however, the measured productivity gap between male and female farmers disappears when gender is included in a list of determinants meant to capture the indirect effects of market and extension access.