Resource competition theory predicts that when two species compete for a single, finite resource, the better competitor should exclude the other. However, in some cases, weaker competitors can persist through intraguild predation, that is, by eating their stronger competitor. Mixotrophs, species that meet their carbon demand by combining photosynthesis and phagotrophic heterotrophy, may function as intraguild predators when they consume the phototrophs with which they compete for light. Thus, theory predicts that mixotrophy may allow for coexistence of two species on a single limiting resource. We tested this prediction by developing a new mathematical model for a unicellular mixotroph and phytoplankter that compete for light, and comparing the model's predictions with a laboratory experimental system. We find that, like other intraguild predators, mixotrophs can persist when an ecosystem is sufficiently productive (i.e., the supply of the limiting resource, light, is relatively high), or when species interactions are strong (i.e., attack rates and conversion efficiencies are high). Both our mathematical and laboratory models show that, depending upon the environment and species traits, a variety of equilibrium outcomes, ranging from competitive exclusion to coexistence, are possible.