In communities structured by body size, coexistence can occur through combinations of ontogenetic changes in competitive ability and dietary niche. Using stable isotopes, we examined ontogenetic niche shifts in Trinidadian guppies (Poecilia reticulata) and killifish (Rivulus hartii) in three types of natural communities (both species with predators, KGP; both without predators, KG; killifish only, KO) and four experimental KG communities, initiated with KGP guppies and KO killifish between 13 and 45 years ago. In all communities, killifish occupied higher trophic positions and changed their diet (δ^13 C) with body size. Only KGP guppies displayed an ontogenetic niche shift. The KG guppies displayed a significant difference in trophic niche from KGP guppies, a character displacement that can facilitate coexistence with killifish. In the experimental communities, the guppy trophic niche was intermediate between those in KGP and KG communities, indicating that evolution has driven the niche shift in KG guppies.