Legumes establish root symbioses with rhizobia that provide plants with nitrogen (N) through biological N fixation (BNF), as well as with arbuscular mycorrhizal (AM) fungi that mediate improved plant phosphorus (P) uptake. Such complex relationships complicate our understanding of nutrient acquisition by legumes and how they reward their symbiotic partners with carbon along gradients of environmental conditions. In order to disentangle the interplay between BNF and AM symbioses in two Medicago species (Medicago truncatula and M. sativa) along a P-fertilization gradient, we conducted a pot experiment where the rhizobia-treated plants were either inoculated or not inoculated with AM fungus Rhizophagus irregularis ‘PH5’ and grown in two nutrient-poor substrates subjected to one of three different P-supply levels. Throughout the experiment, all plants were fertilized with 15N-enriched liquid N-fertilizer to allow for assessment of BNF efficiency in terms of the fraction of N in the plants derived from the BNF (%NBNF). We hypothesized (1) higher %NBNF coinciding with higher P supply, and (2) higher %NBNF in mycorrhizal as compared to non-mycorrhizal plants under P deficiency due to mycorrhiza-mediated improvement in P nutrition. We found a strongly positive correlation between total plant P content and %NBNF, clearly documenting the importance of plant P nutrition for BNF efficiency. The AM symbiosis generally improved P uptake by plants and considerably stimulated the efficiency of BNF under low P availability (below 10 mg kg-1 water extractable P). Under high P availability (above 10 mg kg-1 water extractable P), the AM symbiosis brought no further benefits to the plants with respect to P nutrition even as the effects of P availability on N acquisition via BNF were further modulated by the environmental context (plant and substrate combinations). As a response to elevated P availability in the substrate, the extent of root length colonization by AM fungi was reduced, the turning points occurring at about 8 and 10 mg kg-1 water extractable P for M. sativa and M. truncatula, respectively. Our results indicated competition for limited C resource between the two kinds of microsymbionts and thus degradation of AM symbiotic functioning under ample P supply.