Lignin biosynthesis is a major carbon sink in gymnosperms and woody angiosperms. Many of the enzymes involved are encoded for by several genes, some of which are also related to the biosynthesis of other phenylpropanoids. In this study, we aimed at the identification of those gene family members that are responsible for developmental lignification in Norway spruce (Picea abies (L.) Karst.). Gene expression across the whole lignin biosynthetic pathway was profiled using EST sequencing and quantitative real-time RT-PCR. Stress-induced lignification during bending stress and Heterobasidion annosum infection was also studied. Altogether 7,189 ESTs were sequenced from a lignin forming tissue culture and developing xylem of spruce, and clustered into 3,831 unigenes. Several paralogous genes were found for both monolignol biosynthetic and polymerisation-related enzymes. Real-time RT-PCR results highlighted the set of monolignol biosynthetic genes that are likely to be responsible for developmental lignification in Norway spruce. Potential genes for monolignol polymerisation were also identified. In compression wood, mostly the same monolignol biosynthetic gene set was expressed, but peroxidase expression differed from the vertically grown control. Pathogen infection in phloem resulted in a general up-regulation of the monolignol biosynthetic pathway, and in an induction of a few new gene family members. Based on the up-regulation under both pathogen attack and in compression wood, PaPAL2, PaPX2 and PaPX3 appeared to have a general stress-induced function.