ABSTRACT: The elements present in dead pine stumps inhabited by larvae of wood-boring beetles (Stictoleptura rubra, Arhopalus rusticus and Chalcophora mariana) were analyzed over the initial (first 5 years; a chronosequence) stages of wood decay. The quantities of N, P, K, Ca, Mg, Fe, Zn, Mn, Cu and Na (but not S) increased with increases in the content of ergosterol (used as a proxy for the amount of fungal tissue). In fact, the amounts of P, N, K, Fe and Cu presented marked increases. These findings show that fungi stoichiometrically rearrange dead wood by importing externally occurring nutrients to decaying stumps. During the first years of wood decay, the ratios of C to other elements decrease substantially, but differently, for various elements, whereas the N:Fe, N:Cu, N:P and N:K ratios remain relatively stable. Therefore, the stoichiometric mismatch between xylophages and their food is greatly reduced. By changing the nutritional stoichiometry of dead wood, fungi create a nutritional niche for wood-eaters, and these changes enable the development of xylophages.