1 Introduction

Mineral extraction and processing produce crushed and milled wastes which, when weathered, pose a risk to the environment. In the absence of waste management legislations, these wastes can turn into a significant hazard to the environment (Avila et al. 2008; Khelfaoui et al. 2020; Padoan et al. 2020).

The growing demand for commercial phosphate, especially for the agricultural sector, has led to a thriving phosphate mining industry and a subsequent increase of waste production. Millions of tons of various types of wastes (e.g., tailings, sludges) per year (Eskanlou and Huang 2021) are currently generated, with a ratio of 1 to 12 tons per one ton of phosphate (Taha et al. 2021). These wastes, in turn, contain large amounts of trace metals (e.g., Cd, Cr, Zn, Pb), rare earth elements (REE), and radioactive elements that could, potentially, leach from their bearing rock to pollute soils, plants, and groundwater (Al-Hawaiti et al. 2016). Furthermore, potentially toxic trace element (PTE) leaching from P-bearing deposits is a common issue that comes entangled with several socio-economic problems and physiological and environmental risks (Hamed et al. 2022). To map these risks, extensive mineralogical and geochemical analyses could serve for assessing and quantifying the environmental damages caused by the mining industry, and thus, guide the site remediation and land reclamation strategies.

For decades, the Gafsa mining basin has been one of the most polluted regions in Tunisia in terms of soil, stream sediments, and air. The diffused pollution is mainly associated with the operational phosphate ore extraction and processing activities. Sampled stream sediments, tailings, and soil were proven to be contaminated by potentially toxic elements (PTE), such as Cd, Cr, Pb, and Zn, and the site was globally classified as heavily contaminated (Khelifi et al. 2021). The PTE concentrations, particularly within stream sediments, and tailings exceeded by far international thresholds, namely, Non-Polluted Sediments standards (NPS) (Khelifi et al. 2020a, b). Meanwhile, the occurrence of REEs and trace metals in Tunisian phosphates, stream sediments, sludge, and tailings carried out in Gafsa-Metlaoui mining basin was thoroughly studied by Galfati et al. (2014), revealing that solid effluents of phosphate mines are relatively depleted in REE compared to the washed ore (∑REE = 182 ppm) Furthermore, REE variation within sedimentary phosphates and the geologic processes which govern them are still a matter of controversy among researchers (Emsboet al. 2015). Ferhaoui et al. (2022) indicated that REE occurrence and distribution in Northern African P-deposits are mostly controlled by the depositional environments rather than secular variations during geological ages. However, the study has not further examined the geochemical process controlling their distribution in phosphate effluents or their potential environmental risks.

Beyond PTE contamination, research projects which were conducted on the neighboring, yet similar, basins of Algerian Paleocene-Eocene phosphates (Boumaza et al. 2021; Kechiched et al. 2020; Ferhaoui et al. 2022) revealed that REE were found in relatively high amounts. Moreover, in the study of Kechiched et al. (2018), total REE concentrations were found to be significant (∑REE > 1000 mg.kg−1) within glauconitic particles from the Algerian phosphates, whereas lower average concentrations (∑REE = 322 mg kg−1) were recorded in the Gafsa basin (Garnit et al. 2017). However, the REE concentrations in phosphates rock (PR) of Gafsa basin are considered REE-poor PR compared to other Tunisian basins which elucidated values exceeding 1700 ppm. Thus, Tunisian PR is considered the most REE-enriched rock compared to other deposits around the world such as the Algerian, Chinese, American, or Moroccan phosphates (El Zrelli et al. 2021). Recently, the study of Buccione et al. (2021) focused on comparing North African REE-bearing phosphate deposits, indicated that REEs in the Algerian-Tunisian basin share common geochemical patterns, while Moroccan ones appear significantly different in terms of REE contents and paleo-environment characteristics. Furthermore, these deposits were proven to be a pool of possibly extractable critical REE which, in their turn, could be used and applied in modern industries (e.g., automotive, electronics). Actually, REEs are of paramount importance due to their multipurpose industrial uses (e.g., fabrication of magnets, glass, ceramics, batteries; Yang et al. 2024). In the near future, REE increasing demand will result in possible shortages of their conventional sources (xenotime, monazite, bastnäsite), making it critical to identify low-cost and efficient alternatives (e.g., extraction from E-wastes and mine wastes). Indeed, phosphates and their wastes could be considered significant REE-bearing sedimentary minerals capable of serving as an alternate supply of REE (Ounis et al. 2008; Emsbo et al. 2015; Buccione et al. 2021).

In this context, the present study uses spectroscopic fingerprinting to highlight the relationship between geochemical and mineralogical composition of sediments, soil, phosphate ore, and its wastes, as well as between the studied elements, identifying their potential common sources while reconstructing the paleo-depositional environment and redox conditions. It also aims at providing a preliminary insight into the abundance of some REE within stream sediments and the soil that are mainly affected by mine liquid wastes and solid tailings of the phosphate ore. Additionally, the study attempts to assess the potential environmental and ecological risks associated with critical REE in the different sampled materials which, up to the present date, have not been discussed in previous studies.

2 Materials and methods

2.1 Mining activities in the study area

The study area is located in southwestern Tunisia close to the Algerian borders (Fig. 1). The basin of Gafsa-Metlaoui is characterized by its semi-arid climate, with its typical features of high temperatures during summers occasionally exceeding 45 °C, high evapotranspiration (1680 mm year−1), low precipitation rates (average of ~ 183 mm in 2018), and sparse vegetation cover. The city is mostly known for the industrial activities of phosphate extraction and processing. Due to the peculiarity of the area (e.g., climatic, geographic) and the absence of alternative sectors (e.g., agriculture, tourism, services), the region depends solely on the industrial activities of phosphates (Hamed et al. 2022).

Fig. 1
figure 1

Sampling location on the geologic map (from Bel Haj Ali et al. 1987) and simplified lithostratigraphic column of the study area (after Hamed 2013)

Actually, the phosphate industry plays a pivotal role not only on regional scale but also on national and international levels, boosting for that matter the economy, the export, and the foreign currency provision. Several deposits of phosphates in Tunisia were deposited during Paleocene-Eocene age around the city of Kasserine formerly called “Kasserine Island.” The most exploited mines are those of Gafsa basin, which contain the largest reserves. Typically, the ore is washed and processed within the mining area. The extracted materials undergo exhaustive multi-step processing (e.g., crushing, sieving, washing, flotation) to obtain a P2O5-rich fraction, discarding the accessory matrix, which is considered a “minefield” of potentially toxic trace elements.

The enrichment process generates various kinds of by-products which are disposed either in the water streams (in form of sludge and wastewater) or on the ground in the vicinity of urban sites (in form of solid wastes piles). The dumping sites are almost entirely uncontrolled sites where the wastes are poorly managed. Simultaneously, fine particles from the solid waste piles and the dredged/dry sludge are eventually suspended in the atmosphere.

2.2 Geological settings

Previous studies (e.g., Kocsis et al. 2014) attributed the phosphatic deposits of central and southwest Tunisia to the tectonic events of Late Cretaceous which affected the paleogeographic scene during Paleocene and Eocene. Thus, the shallow marine borders of the prehistoric ocean “Tethys,” interrupted by the “Island of Kasserine” formed an adequate location for the circulation of upwelling currents, the accumulation of organic matter, and the deposition of sedimentary phosphates.

The main series of Metlaoui Group deposited during late Paleocene-Early Eocene. The Metlaoui Group was first defined at its typical location of Thelja area. Furthermore, a cross-section of the area showed three units formed of i) evaporitic deposits with clays, fossiliferous dolomites, and gypsum of Thelja formation (named after its typical location of Thelja area); ii) intercalation of gray marls with phosphatic limestones, limestones, phosphate levels with lamellibranches of Chouabine formation; and iii) deposits of phosphatic conglomerates to the bottom, and a thick calcareous layer to the top of Kef Eddour formation in its typical emerging area of Kef Eddour sector KD (ElAyachi et al. 2016). This sector contains one phosphate processing factory (plant V), while the other two factories (plants III and IV) (within the city) belong to Kef Schfaïr sector KS (Fig. 1).

2.3 Sampling and instruments

Samples comprised two sediment profiles, namely, P (20 subsamples) and P2 (22 subsamples), which were collected from Sebseb wadi, one tailing profile P3 (20 subsamples) and surface tailing PS4 sampled from a tailing pile stacked in the urban area, five phosphate rock (PS1, PS2, and PS3 referred as PKS; PS5 and PS6 referred as PKD) were gathered from Kef Schfaïr sector PKS and Kef Eddour Sector KDS and one sludge sample (PS7) sampled from the plant discarded wastes. The samples (profiles) were divided into 2-cm-thick sub-samples, counted, sorted, and only 19 samples were chosen to be further studied. The main criterion for sample selection is their position within the vertical profiles. Thus, one sample of the top (2 cm), middle (20–22 cm), and the bottom (40–44 cm) of each profile was chosen to evaluate the possible effect of depth over the different samples. Samples of sludge and phosphates are representative samples of open-cast active mines. Meanwhile vertical profile distribution that contains all obtained data of the studied elements was evaluated (see Section 3).

Overall, all the samples underwent sieving (2 mm), oven drying (105 °C, overnight), milling, chemical characterization (pH, electrical conductivity (EC), total organic carbon (TOC)), and acid digestion (HNO3, HCl, and HClO4), and analyzed for metal contents and REEs. Whereas bulk samples were saved for “non-destructive” analysis. Furthermore, pH and EC were determined in 1/2.5 soil/water ratio. Meanwhile, TOC was calculated using the formula suggested by Nelson and Sommers (1982) considering TOC as 58% of OM while this later was determined using the weight loss on ignition method.

Generally, methods such as field observation, X-ray diffraction (XRD), and scanning electron microscopy (SEM) are more commonly applied as global mineralogical analysis tools, while in-depth analysis is rarely conducted by the means of methods such as X-ray photoelectron spectroscopy (XPS).

For the present study, the collected samples were subjected to different geochemical analyses, including inductively coupled plasma mass spectrometry (ICP-MS), X-ray fluorescence (XRF), and XPS analysis. XPS technique is commonly applied to determine the elemental composition, chemical state, and binding energy of material components in surface and interfaces (Greczynski and Hultman 2020).

Similar to the study of Eusden et al. (2002), XPS analysis was applied to identify and quantify possible chemical phases of carbon, nitrogen, oxygen, fluoride, sulfur, and phosphorus. XPS was used on 19 samples with Al Kα (1486.6 eV) source gun at 150 W with a step size of 0.05 eV (ESCALAB 250Xi, Thermo VG scientific). Binding energies values were calibrated with the C1s peak of carbon at 284.80 eV. As for data interpretation, the signals were deconvoluted using XPSPeak 41 and the peaks were identified using the Perkin-Elmer handbook for XPS analysis (Moulder et al. 1992).

XRD analysis was performed using a TTR3 diffractometer with CuKα radiation (K-alpha1 = 1.54 Å). Samples were ground to powder and scanned from 10 to 70° 2θ with a step size of 0.020°. The software X’pert highscore (2019, PANalytical) was used for mineral identification, while graphs were reproduced using Origin 9.1 (OriginLab Corp, MA, USA).

Oxides including major elements were determined in the sampled materials (sediment cores, soil, tailings, and phosphate ore) by the means of XRF (XRF-1800, Shimadzu-Japan) using rhodium X-ray tube target with a power of 4 KVA and a detection limit of 0.5 ppm. REE and trace metal elements (TME) were analyzed by ICP-MS (Agilent 7500cx, Agilent Technologies, Inc, CA, USA). Accuracy and quality assurance were checked using pre-prepared standards of known concentrations. The certified reference material (CRM-GBW07406), approved by General Administration of Quality Supervision (PRC) and provided by National Center for Standard Materials of China, was included in the analysis and obtained results were within ± 5% of certified materials.

For data interpretation, such as REE normalization and anomaly calculations, statistical analysis, and ecological/environmental ecological risk assessments, only average values for each set of samples were considered.

2.4 REE anomalies and statistical analysis

REE in phosphate deposits are mostly used as tracers of paleoenvironments, paleogenisis, paleo-productivity, and paleoredox conditions (Shields and Stille 2001; Xin et al. 2016; Garnit et al. 2017; Zarasvandi et al. 2021; Creac’h et al. 2023). Mostly, Ce and Eu anomalies are calculated for phosphate samples using the following formulas Cean = log Ce/Ce*, where Ce/Ce* = 3CeN/2LaN + NdN (Wright et al. 1987), and Eu an = Eu/Eu*, where Eu/Eu* is expressed as EuN/(SmN + GdN)0.5.While N refers the Post-Archean Australian Shale (PAAS) normalized values. Along with Ce and Eu anomalies, La anomaly and the characteristic parameters of REE, namely, LaN/YbN, LaN/SmN, and GdN/YbN, were calculated (Wu et al. 2018; Li et al. 2022).

Many authors (e.g., Pawlowsky-Glahn et al. 2015; Barceló-Vidal and Martín-Fernández 2016) have raised substantial problems in using raw data to compute Pearson correlations leading to inaccurate results and generating misleading data due to “closure” effect. Therefore, in preparation for the application of statistical tests such as principal component analysis (PCA) and hierarchical cluster analysis (HCA), the geochemical data were converted to ppm. The data were transformed using centered log-ratio (clr) transformation following the Euclidean geometry in real space, which was applied in many previous studies (e.g., Aitchison 1982; Reimann et al. 2008; Blake et al. 2016). It is worth mentioning that for CoDa techniques, the absence of data in a compositional dataset can prevent the conversion of raw data to clr-data (Palarea-Albaladejo et al. 2014; Buccianti et al. 2014); thus, in the present data we have excluded Pb, Co, and Nd due to missing values. The transformation of data into clr-ratios was computed using CoDa Pack software (Comas-Cufí and Thió-Henestrosa 2011). Prior to PCA, Pearson correlations on clr-data were used to interpret elemental inter-relationships between the variables. It was used also for calculation of the distances between the variables/individual and Pearson correlations using an average-linkage clustering method (for agglomerative clustering) were used for conducting HCA. The XLSTAT software (Addinsoft 2021) was used for PCA and HCA calculations.

2.5 Environmental and ecological assessments

Geoaccumulation index was calculated using the formula Igeo = Log2 (CE/1.5 CB). It involves seven classes of contamination: less than zero absent, 0–1 absent to moderate, 1–2 moderate, 2–3 moderate to heavy, 3–4 heavy, 4–5 heavy to extreme, and above 5 extreme contamination levels (Muller 1969).

Potential ecological risk index (RI) implemented earlier by Hakanson (1980) and applied recently by El Zrelli et al. (2021) was calculated as the sum of the subsequent index of each element which is expressed as \(RI={\sum E}_{r}^{i}\mathrm{ \;with \;}{E}_{r}^{i}=\frac{{T}_{r}^{i} \times {C}_{m }^{i}}{{C}_{n}^{i}}\), where \({T}_{r}^{i}\) is the toxic level coefficient, and \({C}_{m}^{i}\) and \({C}_{n}^{i}\) are the concentrations of the specific element i of the sample and of the background value respectively. In other words, the ecological risk is a function of the contamination factor expressed as the ratio of the element’s concentration and its reference value. The risk would be considered very high only if RI ≥ 600, considerable if 300 ≤ RI < 600, moderate if 150 ≤ RI < 300, and low if RI < 150. Due to the lack of local standards, we referred to Post-Archean Australian Shale PAAS and Upper Continental Crust UCC background values.

3 Results and discussions

3.1 Geochemical characterization

All samples were neutral to slightly alkaline, with pHs between 7 and 8. The neutral to alkaline pH is mainly induced by the relatively high carbonate content which is, in its turn, inherited from the nature of the bedrock materials. Total organic carbon (TOC) yielded values that are mostly less than 10% with a moderate organic matter content that is mainly controlled by pedogenic processes and influenced by the ore processing activities.

Generally, TME (Cd, Cr, Mn, Zn Co, Fe, Sr, Cu, Ni, Pb, Ba) concentrations showed higher amounts of Fe, Zn, and Sr on the expense of other elements (Table 1). In the meantime, considering vertical distribution, all of them showed a tendency to increase toward deeper layers particularly for the sediment profile P2 (Khelifi et al. 2021). Accordingly, higher amounts of TME were recorded among the phosphate samples. To a lesser extent, trace metals within solid effluents of Sebseb stream, for the most part in deep sampled sediments (sample SB1), were of high contents. Considering its high toxicity and low threshold, Cd, in particular, was found in significant concentration in phosphates, tailings, and deep stream sediments. Such observation leads to the fact that a great share of potentially harmful elements remains within the mine wastes.

Table 1 Results of major and trace elements of sampled materials of sediments profiles (P, P2) of Sebeseb stream, mine tailings (P3, PS4), soil (P4) phosphate (PKD, PKS), and sludge (PS7) samples

Overall, regardless of the nature of the studied materials, many factors could interfere with the geochemical distribution of these trace elements in a certain material such as the chemical characteristics of the element itself (e.g., ionic radii, valence) that allow its ability to substitute a major element. They are also highly governed by the bearing matrix, its mineralogical composition, as well as grain size distribution (finer fraction is a typical trace element-rich fraction).

3.2 Mineralogy

The XRD diffractograms of the top samples (0–2 cm) as well as the in-depth samples (40 cm) of the sediment profiles (P, P2) shown in Fig. 2 indicates that apatite was the most abundant mineral in the studied samples. Samples of profile P2 of the 2 and 40 cm depth showed similar patterns with higher intensity peaks for deeper sediments.

Fig. 2
figure 2

XRD diffractograms of sediment profile P2 sampled at different depths of Sebseb stream in Metlaoui region (A), tailing profile P3 (B). Phosphate ore samples (C), soil samples (D). CFA: CarbonateFluor Apatite; C: Carbonates; P: Peroskovite; B: Bassanite; Q: Quartz; Z: Zeolite; A: apatite; H: Hiortdahlyte

The mineralogical composition of steam sediments and phosphate samples was represented mainly by carbonate-fluorapatite (CFA, Ca5F(PO4)3) and apatite (Fe bearing, Mn bearing). At a lesser extent, minerals such as hiortdahlyte II (Ca Na)4Ca8 Zr2(Y,Zr,Na)2(Si2O7)4(O3F5) and peroskovite Ba2ANbO6 (A = Tb,Gd) were found. It has been reported that hiortdahlyte is formed mainly in alkaline environments rich with Ca and F (Robles et al. 2001). On the other hand, peroskovite was not reported in previous research on Tunisian phosphates; however, it was stated by Rentería-Villalobos et al. (2010) that peroskovite was found in Spanish phosphates and phosphogypsum. Meanwhile, quartz (SiO2) and zeolite were commonly found in phosphate samples and waste materials. Mine tailing profiles showed different spectra between top (2 cm) and deep profile (40 cm) with significant presence of CFA on the surface, while the mineral composition of the deeper layer seems to be influenced by the nearby soil. Meanwhile, soil samples showed a dominance of Bassanite (CaSO4·1/2 H2O) which could be formed due to the dehydration of gypsum under arid climate (T ≥ 40 °C) (Rouahna 2019). The results are quite reasonable as the phosphate enrichment process and recuperation of the apatite from the bearing matrix using flocculants, which according to Galfati et al. (2014), were proven to be not quite efficient for the total separation. In similar sampled materials of stream sediments, occasional high metal contents were found within coarse fractions (50–2000 μm). That was believed to be owed to the nature of sediments characterized by abundance of carbonates, best known for their sorption ability of metal ions by different fixation modes (Khelifi et al. 2020a).

These findings are in accord with the previously published data of similar samples of phosphates and ore processing wastes. The effect of the bedrock is obviously dominating the mining region.

3.3 Surface elemental composition

The survey scans of phosphate rock, tailings, stream sediments, sludge, and soil are given in Fig. 3. The graphs show the varying ratios of signals of carbon (C1s), nitrogen (N1s), oxygen (O1s), fluoride (F1s), sulfur (S2p), and phosphorus (P2p) in the studied samples. The details of deconvoluted spectra are included in the Supplementary Materials.

Fig. 3
figure 3

 XPS spectra (Survey scans) of selected samples of: (A) Phosphate ore; (B) Sediments; (C) soil; (D) tailings, collected from Gafsa-Metlaoui mining mg.kg-1 showing the signals of Carbon (C1s), Nitrogen (N1s), Oxygen (O1s), Fluoride (F1s), Sulfur (S2p) and Phosphorus (P2p)

Results showed that the most pronounced element is oxygen (XPS region: O1s) in the form of metal carbonate with a narrow high peak spectrum for all samples. Nevertheless, hydrous magnesium metasilicates were found in 44 cm depth and MgO in top layer (2 cm). The marked presence of oxygen in the studied samples could be related to previous exposure to the atmospheric precipitation of carbonates (Nohira et al. 2002).

At a lesser extent, the peaks of fluorine F (F1s), phosphorus P (P2p), carbon C (C1s), nitrogen N (N1s), and sulfur (S2p) are present with the corresponding chemical status: mostly zinc fluoride ZnF2, potassium phosphate K3PO4, adventitious carbon (C–C), and calcium sulfate, respectively. Furthermore, sulfates were found in the form of CaSO4 (169.0 eV) in most of the samples (Table 2). That is most probably related to the nature of the parent materials, particularly the overlaying Jebs (gypsum) formation. Adventitious carbon (284.8 eV) thin layer had probably formed due to an exposure of the studied materials to the atmosphere (Barr and Seal 1995).

Table 2 XPS details for main peaks of the deconvoluted spectra

Si2p peak (103 eV) indicates the presence of Al2SiO3 and mullite (Al2SiO5), while B1s XPS region (190.5 eV) signifies boron nitride (BN) (Biesinger 2017).

XPS scans depicted the presence of elements such as carbonate, sulfate, and phosphate compounds, nitrates, oxides, and cyanides in phosphate ore samples which is in well accordance with previous reports and findings on phosphate ore and apatite (Hidalgo-Carrillo et al. 2012). Overall, stream sediments and ore tailings collected at different depths showed similar composition with the existence of compounds from phosphate ore along with alkali and alkaline earth metals. Soil samples collected from urban area also showed similar composition to tailings and stream sediments. Considering urban set up, organic compounds were found in excess in samples collected at shallow depths. Meanwhile, sludge surface composition is mostly of phosphate, carbonate, and sulfate compounds.

3.4 Major oxides

The distribution of P2O5 varies among the different samples as well as along the same profile according to the depth. The highest values are registered in phosphate samples with 25.2 wt%. For the sediment profile P2, the highest value was recorded in the depth of 20–22 cm with 22.19 wt%. The tailings also showed high value of P2O5 with 25.03 wt% (See Table 1). The profiles of sediments P and soil P4 results yield the lowest concentrations of P2O5 (< 1 wt%) which tend to increase with the depth showing a peak at 20 cm depth to decrease again at 40 cm. Na2O, Fe2O3 (0.37%), K2O (0.12%), and Al2O3 are found to be present in low concentration with relatively higher CO2 contents. Similarly, MgO show low concentrations (varying from 0.75 to 4.18 wt%). As a result, for the majority of the samples, MgO and P2O5 increased inversely while Al2O3 increased proportionally with SiO2.

Broadly, the sample oxide content demonstrated that most of the samples are enriched in P2O5, CaO, and SiO2. These three major oxides were proven to be of high concentrations, as reported previously by Khelifi et al. (2019) and Garnit et al. (2017). The high % are reasonable regarding the fact that phosphatic minerals should be present in the phosphate ore as well as its wastes. Their occurrence was admitted to being associated with the phosphate deposits and the enrichment process as it was proven that phosphate samples (PS2, PS3) are more enriched in P2O5 than the rest of the samples. However, tailing samples seem to have high P2O5 which indicates that the ore enrichment procedure might not be totally effective or that top tailings were tainted by raw phosphate while being transported. The high amounts of CaO were inversely proportional to SiO2 and proportional to P2O5. These results were confirmed with linear correlations of CaO vs. P2O5 with its positive significant linear fit (0.49) and SiO2 vs. P2O5 with negative linear fit (− 0.39), indicating a common mineralogical fraction for CaO and P2O5. CaO is primarily derived from CFA, whereas SiO2 seems to be occluded in different mineralogical fractions, particularly in the matrix (Fig. 4). A comparable trend was observed in the study of Garnit et al. (2017).

Fig. 4
figure 4

Scatter plot of CaO and SiO2 vs. P2O5 correlations (expressed in wt %) for phosphate, stream sediments, tainings, sludge, and soil samples of Gafsa-Metlaoui basin (n = 19)

3.5 Abundance and distribution of REE

Table 3 illustrates the distribution of REE within the different samples. The total concentrations of REE follow the abundance order La > Ce > Nd > Y > Gd > Eu > Sm > Yb > Tb. The samples showed an enrichment of light REE (LREE) over heavy REE (HREE) which were also observed in other phosphate wastes around the world (e.g., Pyrgaki et al. 2021). Comparing the results of REE of the different samples, they were found in high concentration within the sludge sample especially for Ce (406 mg kg−1) surpassing by the values of PAAS. Based on average concentrations within each set of samples (soil, phosphates, and its solid effluent), the same sample showed the highest amounts of Gd, La, Nd, Sm, and Yb. Conversely to other studied profiles, Eu seems to be the most pronounced REE among the sediment profile P. Whereas all REE followed a trend within stream sediments indicating higher contents within deep layers (40 to 44 cm) compared to top sediments (2 to 4 cm) as shown in Fig. 5. Two peaks were observed for the profiles of sediments P2 and tailings P3 below 32 cm for P2, while they were registered below 15 cm for P3. The sediment profile P did not exhibit a detectable pattern for all REE; however, important peaks were noticed beneath 20 cm of depth. While REE within the soil profile P4 showed slight peaks below 20 cm except for Nd that indicated intense peaks.

Table 3 Results of REE distribution (mg kg−1) in different materials and calculated anomalies
Fig. 5
figure 5

Distribution of REE among different profiles: A, B stream sediment profiles, C tailing profile, and D soil profile

Generally, the vertical distribution of REE can be controlled by several geochemical processes (Mihajlovic et al. 2014). Considering the current state of the art, a similar trend was observed in the study of Liu et al. (2019) which was attributed, mainly, to a downward leaching of trace elements. While Zhou et al. (2014) accredited element contents toward deeper layer to the flood plain sedimentation process which preserve subsurface layers relatively undisturbed. Thus, those layers reflect the actual geochemical composition.

Conversely, phosphate samples yield lower amounts of REE. Among phosphate samples only PS5 showed high levels of Ce, Gd, La, Nd, Sm, Yb, and Y which reached 124 mg kg−1. Overall, in most samples, Eu and Tb concentrations were higher than the standards.

The PAAS-normalized of analyzed REE (Fig. 6) depicts an evident enrichment of Eu and a relative abundance of Tb in most of the samples (sediments and tailings). Meanwhile, the remaining REE, particularly Y, showed a depletion tendency. The described trend was reversed for other samples which were found enriched with all REE with a slight lower abundance of Eu and Tb and a relatively high abundance of Y. The abundance of REE in sludge sample is marked by their enrichment with respect to PAAS. The enrichment-depletion trend in these samples is probably controlled by the anthropogenic activity of phosphate ore processing. A similar trend has already been demonstrated in the study by Boumaza et al. (2021) for some trace elements.

Fig. 6
figure 6

REE normalized to PAAS diagram of various sample materials: phosphate ore (PKS: PS1-3 and PKD: PS5-6), sediments (P, P2), tailings (PS4), soil (P4), and sludge (PS7) of Gafsa mining district

3.6 REE anomalies as proxies to track rock source

According to German et al. (1991), the most part of the studied phosphates samples were considered records for well-oxygenated shallow marine conditions which was translated to negative Ce anomalies with a value of (La/Sm)N > 0.35. For all samples the ratio (La/Sm)N was higher than 0.35 which implicated that the results of Ce anomalies are most likely reliable for reconstructing paleo environment and redox conditions (Morad and Felitsyn 2001).

As illustrated in Table 3, most samples showed negative Ce anomalies. Cean for phosphate samples of Kef Echfair area ranged between − 1.34 and − 0.44. To the contrary, samples of Kef Eddour (northern sector) indicated higher Ce anomalies (between 0.75 and 1.87) which reflects oxic depositional conditions in the southern area compared to the reduced conditions of the northern area (Wright et al. 1987). Furthermore, it is common to record precise anoxic diagenesis in similar depositional environments (Ben Hassen et al. 2010), which might be the main cause of the variation of Ce anomalies (Cean) among the studied samples or in this case a potential contamination of the samples in question. That being said, it is more likely for Ce to be in the form of, less soluble, Ce4+ in the samples of the southern area which limits its possible migration (Cao et al. 2001). Nevertheless, the Ce anomaly calculations cannot be used to reconstruct paleoenvironment and/or identify certain geochemical patterns without considering several factors such as the early diagenesis and the late weathering effects. These factors, when not considered, could lead to obtaining an inaccurate Ce anomalies of Ce assessment.

The previous studies conducted on representative sampling have revealed that Ce anomalies from both Tunisian and Algerian deposits are mostly suitable to track redox conditions (e.g., Garnit et al. 2017; Kechiched et al. 2020; Buccione et al. 2021; Ferhaoui et al. 2022). However, the reported values for sediments and tailing appear to be not significant due to mixing and migration of REE during enrichment process and disposal conditions.

Meanwhile, all samples showed positive Eu anomalies (Euan). Euan results of Kef Eddour sector phosphate samples (0.28 to 0.56) were found analogous to those indicated by Kechiched et al. (2020) for similar phosphate sections in Algeria. Other samples of Kef Echfair sector showed higher Eu anomalies (11.53 to 18.74), suggesting a tendency to oxic conditions in the southern area and potential warm paleo-hydrothermal conditions (Nakada et al. 2017). The results are in consistency as the lower Eu anomalies were of the same samples showing the higher positive Ce anomalies.

Lanthanum (La) anomaly showed a wide variation range (0.86 and 12.27). Generally, La anomaly is largely applied as fingerprints of methanotrophy in biological samples, e.g., shellfish mussels (Wang et al. 2020). Accordingly, the anomaly could serve for tracing the biological activity of methanotrophs responsible of aerobic methane oxidation. However, their use in geological and environmental samples is still a matter of discussion (Barrat et al. 2023).

3.7 Statistical analysis

3.7.1 Pearson’s correlations

Pearson’s correlations were calculated on clr-data (Table S3) rather than raw data to overcome the skewed effect usually associated with geochemical data (Table S4). They show significant correlations (p-value ≤ 0.01) between clr-P2O5 and both clr-CaO (r = 0.87) and clr-Na2O (r = 0.99), reflecting the apatite component, as stated above in the mineralogical study. The occurrence of this component in the studied samples, including sediments and soils, results from phosphate rocks that are enriched in apatite minerals (Garnit et al. 2017; Khelifi et al. 2019; Kechiched et al. 2020).

3.7.2 Principal component analysis and cluster analysis

Principal component analysis (PCA), representing one of the most common multivariate statistical treatments, was conducted using correlation matrix of clr-data (see Table S4). By reducing dimensionality, the underlined structures could be better interpreted and highlighted (Davis 1986). Here, we have much interest in depicting the main sub-compositions promoting the controls on trace metal and REE distribution in samples studied. The main components, PC1 and PC2, gather 85.89% of the total explained variance (PC1 = 50.25%, PC2 = 30.64%, PC3 = 9.55%, PC4 = 2.56%) (Table S5). Therefore, a biplot was established by plotting PC1 against PC2, as illustrated in Fig. 7. Within this biplot, the main trends are elucidated and interpreted.

Fig. 7
figure 7

Biplot of the PC1 versus PC2 components from the PCA analysis on clr-transformed data

The first trend toward a positive association with PC1 includes a group of TMEs, such as Cd, Cr, Zn, Sr, Ni, Cu, and Mn. Conversely, the subsequent trends show a negative loading with PC1, displaying three sub-trends: (1) REEs and Ba exhibit a negative loading with PC1 and a positive association with PC2, representing most of REEs (LREE: La, Ce, Sm; HREE: Gd, Y, Yb); (2) silicate and matrix elements demonstrate high negative loadings toward PC1 and low loadings on negative PC2, including K2O, Al2O3, SiO2, Fe2O3, MgO, and Tb; and (3) apatites exhibit high loadings toward negative PC2 and low loadings for a negative PC1, containing P2O5, CaO, Na2O, SO3, CO2, and Eu.

Compared to previous studies on phosphorites in Tunisia (Galfati et al. 2014; Garnit et al. 2017) and Algeria (Kechiched et al. 2020; Boumaza et al. 2021), these trends elucidate the primary chemical components of phosphate rocks (apatites, matrix, and silicates). Additionally, it is observed that sediments and soils are influenced by mining operations.

The PCA also reveals a significant fractionation of REEs and TME among the principal mineralogical phases of the samples. The positioning of samples in the biplot indicates that some exhibit a relatively enriched composition aligned with the main trends identified by the PCA analysis. For instance, the sample PS7 is plotted on the REE zone, indicating that phosphate sludges tend to accumulate REEs during the phosphate beneficiation process, leading to the removal of REEs from phosphate and their enrichment in fine sludges. Furthermore, the sediment sample (P) shows enhancement with silicate elements, which can be attributed to the matrix component. With the exception of samples PKD and PS4, which are relatively enriched in some TME, the remaining samples appear to be scattered across these trends.

To further clarify these trends, the hierarchical cluster analysis (HCA) that was conducted on clr-data is presented in form of dendrograms (Fig. 8). They show visually three distinct clusters where each cluster can reflect a geochemical fingerprint.

Fig. 8
figure 8

Hierarchical cluster analysis dendrograms for the studied samples

Dendrogram mainly contains three clusters defining the main chemical associations in the studied samples. The first cluster (A) contains in trace metal elements, such clr-Cu, clr-Mn, clr-Cd, clr-Zn, clr-Ni, and clr-Cr which are relatively enriched in PS4 and PKS samples. The second cluster (B) includes mainly rare earth and clr-Ba. This cluster fingerprints two samples (P and PS7), which represent contaminated sediments and sludge, respectively. Markedly the sludge sample (PS7) yields the maximum of ∑REEs (1237 ppm), indicating that fine fractions can therefore enhance REEs. The third cluster (C), which itself can be divided into three sub-clusters of (i) clr-SO3; (ii) clr-Tb, clr-MgO,clr-K2O, Fe2O3, Al2O3, SiO2, clr-Na2O, clr-SO3, and clr-Al2O3; and (iii) clr-P2O5, clr-Na2O, clr-Eu, clr-CaO, and clr-CO2, reflecting phosphatic rock and soil patterns containing sulfates, matrix and apatite with variable amounts in the samples.

3.8 Environmental assessment and the ecological risk

The Geo-accumulation index was calculated with respect to UCC values and to PAAS values. There was no noticeable variation between the obtained results, which leaves no possibility for misinterpretation. Furthermore, there was no contamination with REE for most of the sample except for Eu that showed moderate to heavy contamination level, reaching 3.83. Conversely, only the sludge was found moderately to heavily contaminated with REE (except for Tb).

Among the studied REE, Eu showed the highest contamination factor indicating a very high contamination level; accordingly, it reflected on the single ecological risk with a remarkable difference compared to the rest of the elements. However, it remained within < 150 threshold, signifying a low individual risk. Examining the total ecological risk (RI) of the various sampled materials reported in Table 4, values were found slightly higher than 150 with one sample that had a moderate ecological risk. However, the rest of the samples demonstrate a low ecological risk.

Table 4 Calculated environmental and ecological risk indices for the studied REE in phosphate samples, stream sediments, tailings, soil, and sludge

These results indicate that most of the samples are not contaminated with REE except for Eu. These findings indicate that the presence Eu is most probably enhanced by the phosphate processing activities. However, there is no noteworthy ecological risk associated with their enrichment.

4 Research limitations

The study faced a few limitations which consisted of providing a complete and a thorough data set particularly for REE. It is admitted that missing data could inspire an interpretative bias. Conversely, it is usually considered of insignificant role outside of the statistical framework. Generally, in the context of gathering and organizing data, it is practically inevitable to avoid missing data (Mayer et al. 2020). Examining the present results, for REE only 2.92% of the mean observations (for each profile) attributed as below detection limit (non-detected, nd). A similar case was treated in the study of Todorović et al. (2020). While about 60% of the total REE were analyzed. Thus, the most critical REE were presented while the results of others were not provided. However, as stated in the introduction, this study is mainly intended to represent a preliminary investigation of the most abundant elements in phosphate ore, its wastes, sediments, and soil around the mining area. Therefore, for a better understanding of the geochemical patterns and fractionation, it is recommended to conduct a comprehensive analysis.

Data comparison and normalization were seen as a matter of concern as well. It is acknowledged that the concentration of REE is highly dependent on the study area and the nature of the parent rock (Li et al. 2022). However, throughout the literature, as previously mentioned in Section 2.3 due to the absence of local standards, we have used the UCC standards for index calculations. This is comparable to the recent studies conducted on sediments of China (Liu et al. 2023) and Brazil (de Freitas et al. 2021) which for that matter faced the same limitation.

While the statistical analysis was conducted after a transformation of raw data into new centered log-ratios to address issues related to linearity of data, as highlighted by several authors (e.g., Filzmoser et al. 2010), some limitations are associated with this statistical treatment, primarily due to the relatively low sample size and the mixture of data (tailing, sediments, and soils). The study has identified the fractionation of TME and REEs resulting from leaching and post-processing sedimentation of generated wastes. Therefore, future research should be undertaken to delineate the economic significance of REEs in both resources and quality based on the quantity of critical elements in the phosphate processing chain and its associated wastes and sediments.

5 Conclusions and recommendations

The study intends to evaluate the anthropogenic input of trace elements, in particular, REEs, through geochemical and mineralogical characterization of phosphate-mine-contaminated materials in a North African mining area. The main goal is achieved through several processes and revealed the following:

  1. 1.

    The sampled materials contain high contents of carbonate mineral mainly CAF in most of the samples. 

  2. 2.

    Most trace elements and REEs tend to accumulate in subsurface layers (mainly below 30 cm) within sediment profile which is probably governed by the flood plain sedimentation patterns and/or potential in-depth leaching.

  3. 3.

    The Ce and Eu anomalies helped in reconstructing characteristics of phosphatic rock origin showing sub-oxic to oxic depositional Paleoenvironment.

  4. 4.

    The statistical study proved the presence of underlying similarities between the various materials. These parallels were attributed to phosphate ore processing activities and probable contamination of the surrounding environment.

  5. 5.

    The environmental assessment indices showed an absent contamination, a moderate enrichment of REE except for Eu which showed heavy contamination and an extreme enrichment. Y depicted a deficiency of enrichment in most of the samples except for sludge sample which was found enriched with REE as well.

In a broader context, several factors intervene with the geochemical and the mineralogical composition of stream sediments, tailing sludge, and soil of a mining area and the variation of REE within a single profile. Thus, these variations are not strictly limited to one single factor as anthropogenic activities or natural circumstances (geologic landscape, flood plain sedimentation patterns, etc.). Indeed, the examination of the studied elements highlighted the role of phosphate processing activities in enhancing the enrichment of Eu. Even though there are no proven environmental and ecological hazards associated with REE and accordingly no detrimental effects on humans associated with rare earth elements. However, the provided data could be of use in assessing the potential extraction (magnetic separation), valorization, and exploitation of such material, particularly the landfilled wastes, investing in that way in the circular economy and guaranteeing environmental sustainability.