Variations in ambient light conditions across different microhabitats can modify the detectability of predators and prey. Prey have been shown to be more visible in sunlit than in shaded patches, leading to higher predation risk and more investment in vigilance (predation risk hypothesis). Additionally, prey have been hypothesized to take longer to detect predators in sunlit compared to shaded patches because of the excess of sunlight causing glare effects (disability glare hypothesis). We tested the predictions of these two non-mutually exclusive hypotheses in a seminatural experiment with brown-headed cowbirds by measuring vigilance behavior and detection of a ground predator in patches under the shade of vegetation and in the open. Light intensity and achromatic contrast were higher in the sunlit patches, which could enhance glare effects, but chromatic contrast was higher in the shaded patches. Brown-headed cowbirds took longer to show alert reactions to and flee from a ground predator in sunlit compared to shaded patches. However, the two parameters associated with perceived predation risk (vigilance prior to the predator exposure and time to resume foraging after the attack) did not differ between sunlit and shaded patches. Our findings support to a greater extent the disability glare hypothesis than the predation risk hypothesis. Overall, ambient light conditions can affect two critical components of behavioral predator–prey interactions in terrestrial habitats: detection of and escape from predators. The effects of disability glare are expected to be more pronounced in bird species with wider visual fields or without sun-shading structures; however, species may compensate through various behaviors (e.g. avoidance of sunlit patches and changes in head orientation).