Surveys (in 2002 and 2003) were performed for fungal endophytes in roots of 24 plant species growing at 12 sites (coastal and inland soils, both sandy soils and salt marshes) under either water or salt stress in the Alicante province (Southeast Spain). All plant species examined were colonized by endophytic fungi. A total of 1830 fungal isolates were obtained and identified by morphological and molecular [internal transcribed spacer (ITS) and translation elongation factor-1α gene region (TEF-1α) sequencing] techniques. One hundred and forty-two fungal species were identified, belonging to 57 genera. Sterile mycelia were assigned to 177 morphospecies. Fusarium and Phoma species were the most frequent genera, followed by Aspergillus, Alternaria and Acremonium. Fungal root endophytic communities were influenced by the soil type where their respective host plants grew, but not by location (coastal or inland sites). Fusarium oxysporum, Aspergillus fumigatus and Alternaria chlamydospora contributed most to the differences found between endophytic communities from sandy and saline soils. Host preference was found for three Fusarium species studied. Fusarium oxysporum and Fusarium solani were especially isolated from plants of the family Leguminosae, while Fusarium equiseti showed a preference for Lygeum spartum (Gramineae). In some cases, specificity could be related to intra-specific variability as shown by sequencing of the TEF-1α in the genus Fusarium.