The family Pinaceae (order Coniferales) includes many environmentally and economically important softwood tree genera. The most important Pinaceae species endemic to Europe is the Norway spruce tree (Picea abies). This tree species is frequently subject to severe attacks by the scolytid bark beetle Ips typographus and its microbial associate, the blue stain fungus, Ceratocystis polonica. Spruce trees have structural and chemical defense strategies against invasion by the beetle-fungus complex, including cells with autofluorescent inclusion bodies containing aromatic compounds such as stilbene glucosides and flavan-3-ols. The goal of our research was the elucidation of the pathways leading to the formation of stilbene glucosides and flavan-3ols in spruce and to determine their role in the defense of this tree against infection by the bark beetle associate C. polonica. Research in this thesis demonstrated that the biosynthesis of the major tetrahydroxystilbenes in spruce, astringin and isorhapontin, proceeds via resveratrol and is enhanced by fungal infection. Furthermore, it was also shown that flavan-3-ol biosynthesis, which is driven by three newly characterized leuconanthocyanidin reductase enzymes, is up-regulated in response to infection by C. polonica. However, although C. polonica is slightly inhibited in its growth by stilbenes and flavan-3-ols, the fungus has adaptive mechanisms to overcome the toxic effects of phenolic spruce defenses. In this context we showed that C. polonica can detoxify stilbene glycosides by biotransformation into stilbene lactones, aglycones as well as stilbene dimers. By comparing in vitro biotransformation rates of C. polonica stains which differed in their virulence against Norway spruce, we could show that the polyphenol detoxification strategy and velocity has a significant effect on the ecological fitness of this fungus during spruce infection and colonization.