- • Changes in gene expression by isolates of Terfezia boudieri during mycorrhization with Cistus incanus hairy roots were followed. • Four fungus–hairy root clone combinations were cultivated under two sets of conditions, in which the root and the fungus were separated by a cellophane sheet or were allowed physical contact. One of the combinations produced endomycorrhizas, the other three solely ectomycorrhizas. Fragments isolated by cDNA–AFLP analysis from cellophane-separated cultures (preinfection) were used to identify differentially expressed genes by reverse Northern analysis. • Genes showing no homology to known sequences constituted the largest group under both growth conditions. Some fungal genes were expressed transiently, while others exhibited altered expression patterns as conditions changed from individually growing through the preinfection stage to mycorrhizas. Genes expressed exclusively under combinations allowing either ectomycorrhiza or endomycorrhiza under a particular condition were detected. • Our results point, for the first time, to some of the genes that might be involved in determining the type of association that will be formed: ecto- or endomycorrhiza.