How the prefrontal cortex contributes to working memory remains controversial, as theories differ in their emphasis on its role in storing memories versus controlling their content. To adjudicate between these competing ideas, we tested how perturbations to the human (both sexes) lateral prefrontal cortex impact the storage and control aspects of working memory during a task that requires human subjects to allocate resources to memory items based on their behavioral priority. Our computational model made a strong prediction that disruption of this control process would counterintuitively improve memory for low-priority items. Remarkably, transcranial magnetic stimulation of retinotopically-defined superior precentral sulcus, but not intraparietal sulcus, unbalanced the prioritization of resources, improving memory for low-priority items as predicted by the model. Therefore, these results provide direct causal support for models in which the prefrontal cortex controls the allocation of resources that support working memory, rather than simply storing the features of memoranda.