Functional brain organization of macaque monkeys and humans was directly compared by functional magnetic resonance imaging. Subjects of both species performed a modified Wisconsin Card Sorting Test that required behavioral flexibility in the form of cognitive set shifting. Equivalent visual stimuli and task sequence were used for the two species. We found transient activation related to cognitive set shifting in focal regions of prefrontal cortex in both monkeys and humans. These functional homologs were located in cytoarchitectonically equivalent regions in the posterior part of ventrolateral prefrontal cortex. This comparative imaging provides insights into the evolution of cognition in primates.