We test the hypothesis that introns were used to construct the first genes from small exons, whose protein products represent compact elements of structure. For any three-dimensional structure, a computer program analyzes the structure into a set of modules, segments of the polypeptide chain bounded in space by a maximum diameter, separated by a set of 'boundary regions'. The 'boundary regions' are such that if the gene were divided by an intron in each 'boundary region', the protein would be divided into modules less than the specified diameter. Using a set of 32 ancient proteins, which have no introns in prokaryotes, we examine the intron positions in their eukaryotic homologs and show that the introns are correlated with modules of diameter 21, 28 and 33 A, with P values below 0.001.