The Formicidae are considered crucial components of the entomosarcosaprophagous fauna because they can delay the decomposition process, cause tissue postmortem damage and produce bloodstain patterns that may confuse investigations. Moreover, some studies suggest that the Formicidae can act as environmental and seasonal indicators. However, studies on this group on vertebrate carcasses are scarce, especially in the Iberian Peninsula and the southwest of Europe. Thus, comparative studies at different altitudes in a protected wild mountain area could provide useful information on its composition in such environmental conditions, their role as environmental indicators and their forensic implications. For this reason, the Formicidae sarcosaprophagous community was studied at three different altitudes, between 400 and 1,500 m, in a wild mountainous area in the southeast of Spain using a modified Schoenly trap, with two pitfall traps inside, baited with 5 kg piglets (Sus scrofa L.). This work illustrates an approach to the community of the Formicidae, as a representative of the sarcosaprophagous community in an altitudinal gradient, showing a great variability in its composition. Furthermore, when comparing our results with other studies carried out in the Iberian Peninsula, we are able to suggest certain species with a potential utility as geographic and environmental indicators. Thus, Iberoformica subrufa, Lasius brunneus, Lasius cinereus and Camponotus sylvaticus are species of special interest as they appeared in either one of the sampled areas or in the same region.