To investigate the role of selective attention in artificial grammar (AG) learning, participants were presented with "GLOCAI" strings-that is, chains of compound global and local letters. The global and local levels instantiated different grammars. The results of this experiment revealed that participants learned only the grammar for the level to which they attended. The participants were not even able to choose presented but unattended strings themselves. These results show that selective attention plays a critical role in AG learning.