Resin acids are protectants and wood preservatives that are produced by parenchymatous epithelial cells that surround the resin ducts in trees from temperate coniferous forests. The resin acids are formed when two-carbon and three-carbon molecules couple with isoprene building units to form monoterpenes (volatile), sesquiterpenes (volatile), and diterpenes (nonvolatile) structures.
Pines contain numerous vertical and radial resin ducts scattered throughout the entire wood. The accumulation of resin in the heartwood and resin ducts causes a maximum concentration in the base of the older trees. Resin in the sapwood, however, is less at the base of the tree and increases with height.
In 2005, as an infestation of the Mountain pine beetle (Dendroctonus ponderosae) and blue stain fungus devastated the Lodgepole Pine forests of northern interior British Columbia, Canada, resin acid levels three to four times greater than normal were detected in infected trees, prior to death. These increased levels show that a tree uses the resins as a defense. Resins are both toxic to the beetle and the fungus and also can entomb the beetle in diterpene remains from secretions. Increasing resin production has been proposed as a way to slow the spread of the beetle in the "Red Zone" or the wildlife urban interface.