African governments and international development groups see boosting productivity on smallholderfarms as a key way to reduce rural poverty and safeguard the food security of 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. Our results suggest the two are related. We find that 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. However, we find that the gender productivity gap, significant in OLS regression results, disappears when gender is included in a list of determinants meant to capture the indirect effects of market and extension access. Consistent with observed risk mitigation production choices, the research confirms the important consequences of unexpected weather outcomes on yields.