We describe a phylogenetic and spatial approach to the comparative study of character displacement and other coevolutionary phenomena. The method is developed as an in-depth study of blossom morphology in 37 populations of the Neotropical vine Dalechampia scandens. We test the hypothesis that among-population variation in blossom morphology is due largely to local adaptation to avoid competition from other species of Dalechampia that utilize the same restricted set of pollinators. Because direct phylogenetic and historical information are unavailable for these populations, we develop a novel comparative method for the study of adaptation to a spatially distributed selective factor in spatially correlated populations. In addition to providing spatially, or phylogenetically, corrected estimates of selective effects, the method assesses the local specificity of adaptations. We find evidence for moderately strong local specificity of adaptation among our populations, and furthermore we find that the effects of putative competitors are in accordance with predictions from a hypothesis of character displacement. However, sympatry or allopatry explains only 10%-20% of the interpopulation variation in blossom morphology, and we therefore cannot exclude the possibility that some other selective factors are major determinants of the variation.