To assess the effect of the duration of chronic hypoxemia on cognitive function, we studied 38 children with d-transposition of the great arteries and an intact ventricular septum who underwent corrective surgery at six months to six years of age (median, 1.6 years). Tests included the Wechsler Preschool and Primary Scale of Intelligence (WPPSI) in 33 children and the visual-association and auditory-association subtests of the Illinois Test of Psycholinguistic Abilities in 38 and 37 children, respectively. When controlled for social index, age at repair was inversely associated with the WPPSI intelligence-quotient score (P less than 0.01), the visual-association subtest score (P less than 0.01), and the auditory-association subtest score (P less than 0.1). In contrast, age at repair correlated poorly with cognitive function in children with ventricular septal defect, an acyanotic congenital heart defect. These data suggest that postponing repair of a cyanotic congenital heart disease, such as transposition of the great arteries, is associated with progressive impairment of cognitive function.