Pinus pinaster Ait. is the most widespread conifer in Spain and is now the only species tapped for its oleoresin. External induction of resin secretion, based on the defense system of Pinus trees, has been performed by humans since Classical times through various methods. The socio-economic implication of this practice in Spain justifies a new approach to improve tapping methodology and understand the effects of this activity on the tree. In the last five years, sharp increases in the price of natural resins, accompanied by technological advances directed toward mechanization, have made resin tapping a strategic activity for rural development and forest conservation. The resin industry demands more efficient tapping methods and forest management plans as a way to increase competitiveness in a global market. In this way, this work focuses on the study of the defense system of P. pinaster, with the aim to understand the effects of anatomical and physiological characteristics and environmental conditions on resin yield. The relationships between anatomical variables -with special focus on resin canals-, dendrometric and dasometric variables, and resin yield will be evaluated (objective 1). The tapping wound effects (objective 2) and the intra- and inter-annual variability of climate conditions and soil water availability influence (objective 3) on resin yield will be also studied. The plant and soil material and the resin yield and climatic data used in this thesis have been collected in stands of three public forests of P. pinaster; Armuña, Melque de Cercos and Nieva, located in Segovia (Central Spain). Trees were tapped using two different methods: mechanized or traditional tool, in both upwards and downwards direction. Twenty-six tapped trees of contrasting resin yield classes and twelve non-tapped (control) trees, growing in two locations (Armuña y Melque de Cercos) with the same climate but different stand density and soil characteristics, were selected for studying the role of tree size, xylem anatomy at distal parts aside from the tapping wound (objective 1) and climate influence (objective 3) on resin yield. Concerning the tree defenses induced by the tapping wound (objective 2), the xylem of eight trees, tapped with the two described methods in both upwards and downwards direction, were analyzed. From each tapped tree, eight cores were collected at different locations and varying distances from the tapping wound. In each core, a histological analysis was made. Growth ring width, earlywood and latewood width, and axial canal frequency, area, mean size and location were measured. The effect of the tapping method on resin yield was assessed in 561 P. pinaster tapped trees in a stand in Nieva. In tissues not affected by the tapping wound, the frequency of radial resin canals and the total volume of resin canals were related to resin yield. The frequency of radial canals and the resin yield were strongly related to tree diameter and percentage of live crown. High area of axial resin canals per mm2 was related to high yielding trees, but only in the location with higher plant density and poorer soil quality. In tapped trees, an increase in axial canal frequency and area was found during the three years following the start of tapping activity, suggesting that canal formation is a systemic induced response to wounding. The highest mean annual resin yield was found using the traditional tool in upwards direction, which also induced the highest increase in axial canal frequency and area. The lowest yield was found for mechanized tapping, which showed no differences between the upwards and downwards directions. The strongest induction of systemic induced responses in terms of resin canal frequency and area was detected one year after tapping for upwards tapping. This suggests the involvement of signaling processes that spread mainly upwards, and the importance of adaptive processes as a defense against periodic insect attacks. Intra-annual variation in resin yield was strongly correlated with temperature, solar radiation, potential evapotranspiration and soil water deficit. Inter-annual variation in resin yield and resin canal abundance were correlated with temperature and water deficit in spring, but above a certain threshold of cumulated water deficit in summer rainfall favored resin yield. Under adverse climate scenarios where resource optimization is desirable, a reduced tapping season during the warmest months (June–September) would be advisable, assuming a very small production loss relative to traditional tapping season. Similarly, in years with a rainy summer and/or dry spring, a slightly longer tapping season could be suggested, as resin yield increases after these events. Tree diameter and percentage of live crown, and radial resin canal frequency could be useful criteria for estimating resin yields in P. pinaster. Vigorous trees in lower density stands and growing up in good quality soils will be the most productive. These conclusions could be applied to improve tapping management and breeding programs. These works are complemented with socio-ecological characterization, the identification of the main ecosystem services and an assessment of the possible economic impact derived from the tapping practice. To conclude, more scientific studies are necessary for understanding the anatomical and physiological processes behind resin synthesis and their interactions with the environment. This would afford further progresses towards an extensive and reliable bibliography and improved tapping methods and optimal selvicultural guide lines.