Introduction

Ancient wall painting, vital components of World Cultural Heritage, serve as crucial carriers of human civilization. Their composite materials including mineral pigments, bulk sediments, original binder (e.g. casein/animal-skin glue/gelatin), plant fibers (e.g. hemp/wheat straw/cotton) used for structural reinforcement, and synthetic resins for restoration1,2, inherently provide nutrients supporting microbial colonization1. Under favorable conditions, microorganisms can proliferate extensively even developing into biofilms. Microbial communities (bacteria, cyanobacteria, fungi and algae) employ enzymatic degradation and mechanical penetration of wall paintings3,4,5 to induce “biodeterioration”–a complex process involving biochemical decomposition, structural weakening, and esthetic damage6,7,8,9. Such microbial damage has led to irreversible loss in notable sites like Lascaux Cave (France)10, Mogao Grottoes (China)11, Altamira Cave (Spain)12, and Takamatsuzuka Tumulus (Japan)13.

Recent advances have shifted research focus from mere taxonomic surveys to the metabolic activity, functional roles and degraded potential of microbes in biodeterioration14,15. While fluorescence microscopy and culturing remain foundational16, high-throughput RNA sequencing technology enables precise identification of metabolically active taxa17,18. Notably, significant differences in sequencing results obtained from DNA and RNA, emphasizing RNA-based sequencing is necessity for accurate viability assessment in microbiomes19. Microbial viability within a community is a dynamic process shaped by environmental conditions, even microorganisms that are currently inactive may have played critical roles during past microbial outbreaks10. Therefore, characterizing the metabolic capacity and biochemical reactions of active microorganisms is crucial for assessing their deteriorative potential and providing protective strategies19. Thereinto, active fungi play a vital role in the microbial community by regulating essential ecological processes. They can result in physical, chemical, and esthetic degradation of wall paintings, due to their strong abilities to produce enzymes and metabolize inorganic or organic substances20. Functional ecological analyses of fungal communities improve our understanding of resource competition and niche differentiation, facilitating predictive models of microbial impacts on heritage sites21,22. Experimental and global meta-analyses have shown that fungal functional groups defined by the FUNGuild database are more ecologically relevant than traditional taxonomic groupings23.

Microorganisms pose significant threats when environmental conditions support their growth and metabolism. Cave ecosystems impose several stresses, such as nutrient limitation, darkness, and high mineral salt concentrations24, which influence the relationship between microbial communities and surface ecosystems25. Critical drivers of biodeterioration include temperature (T), relative humidity (RH), light, pH value, electrical conductivity (EC) of the materials17,26, and the presence of animals or plants27. To survive fluctuating conditions, microbes adopt stochastic phenotypes28, while biofilms actively modify substrate microenvironments29. Microbial communities are shaped by both selective pressures, leading to predictable shifts in species composition (homogeneous selection)30, and stochastic dispersal, which introduces new taxa and increases microbial abundance31.

The Maijishan Grottoes, a UNESCO World Heritage Site along the Silk Road, are renowned with their stunning landscapes, intricate sculptures, and unparalleled wall paintings. The basic materials of wall paintings including loess, fine sand, plant fibers, and binding media. However, the region’s temperate monsoon climate (600–700 mm annual rainfall), combined with high vegetation density and insect activity, promotes microbial outbreaks. Since 2018, a series of microbial outbreaks have occurred in several caves of the Maijishan Grottoes, threatening the long-term survival of Maijishan Grottoes32. Notably, in Cave No. 28 and Cave No. 30, white biofilms and black biofilms have appeared on ancient wall paintings and restored materials, respectively, threatening their preservation. However, microbial communities, biodegradation mechanisms, and conservation strategies in these caves remain poorly understood, despite their critical importance for the protection of the Maijishan Grottoes. Therefore, this study aims to: (1) identify the primary microbial contributors to black and white biofilms, (2) assess microbial viability and biodeterioration potential, and (3) explore reasons for differential biofilm colonization on distinct materials.

Methods

Sampling locations and description

The Maijishan Grottoes are situated at Tianshui Maiji Mountain (105.73° E, 34.56° N), a segment of the grand Qinling Mountain range. The site comprises 221 caves, 10,632 sculptures, and wall paintings covering an area of 1000 square meters32. Cave No. 28 and Cave No. 30 were dug during the early Western Wei Dynasty and situated at the lower position of the eastern cliff of Maijishan (Fig. 1A). Both caves are structured with an exterior facade and a front porch connecting three niches (Fig. S1A–D), and the two caves contain stunning and beautiful Buddhas as well as wall paintings (Fig. 1B–E). Due to their lower excavation positions, Cave No. 28 and Cave No. 30 are susceptible to rainwater infiltration. Parts of the wall paintings have been affected by catastrophic plaster detachment and paint loss, thus subsequent restoration of the plaster layers have been taken in the 1980s using restored materials, with the detailing records on the walls (Fig. S1F). In recent years, with increased rainfall, microbial damages have occurred in these two caves manifested as visible white biofilms on wall painting areas and black biofilms on restored plaster layers (Fig. 1F–K).

Fig. 1: Locations of the study site and typical sampling areas on murals in the caves.
figure 1

A Locations of Cave No. 28 and Cave No. 30 in the Maijishan Grottoes; BE beautiful Buddha statues and wall paintings; FH Sampling sketch map of Cave No. 28 with sampling locations in the No. 2 and No. 3 niches; IK Sampling sketch map of Cave No. 30 with sampling locations in the three niches; including the black biofilms on the surfaces of restored plaster layers and the white biofilms on the surfaces of ancient murals.

In this study, a total of 18 microbial samples were collected in August 2021 from Cave No. 28 and Cave No. 30 of the Maijishan Grottoes. Among these samples, 12 samples were collected for high-throughput sequencing (HTS), including black biofilms and white biofilms, named as W1 (R)-W3 (R) (W means white) and B1 (R)-B3 (R) (B means black). All the HTS samples were collected from designated areas (Figs. 1F–K and S1G, H), where mycelial mats within defined 10 × 10 cm square were collected by sterile forceps. The thoroughly mixed samples were then divided into two equal parts: one aliquot was preserved for DNA extraction, while the counterpart was reserved for RNA analysis to assess viable metabolic states (designated with “R” suffix, e.g., W1R). Samples intended for RNA analysis were immediately submerged in RNAlater (Qiagen, Germany) to prevent RNA degradation. Along with additional three white and three black mycelial samples were used for microbial culturing and isolation. Sterile forceps were used to gently collect samples, removing only biofilms without painting and restored materials, and ensuring no visible damage during the sampling process. Each collected sample weighted about 50 mg and was placed in a sterile Eppendorf tube. At the same time, detached wall painting fragments and restored materials from the ground totaling approximately 10–15 g were also gathered for subsequent physical-chemical analyses and the original material culture media preparation (Fig. S1E). All of the HTS and detached material samples were stored at −20 °C, and microbial culture samples were stored at 4 °C, then transported to Lanzhou University for further experiments and analysis. All sampling procedures were conducted with authorization from the Art Institute of the Maijishan Grottoes, following established guidelines and practices, and all the above sampling information was detailed in Table S1.

Physicochemical analyses

Samples of original wall painting and restored material, each weighing approximately 3 g, were dried to constant weight in a 105 °C oven. The dried samples were then weighed to calculate the moisture content (MC). The pH values of wall painting and restored material fragments were measured in deionized water (1:5, w/v) using a pH-meter (Sartorius PB-10), and the EC was determined in 1 M KCl solution (1:5, w/v) using a conductivity meter (Leici DDSJ-318, Shanghai, China). Total organic carbon (TOC) and total nitrogen (TN) contents were analyzed using a CHNS-analyzer system (Vario EL cube, Elementar Analysensysteme GmbH, Hanau, Germany) with combustion methods at 450 °C and 1250 °C, respectively33.

Environmental data analyses

Environmental monitoring was conducted in Cave No. 28 and No. 30 from 2021 to 2022 to explore the relationship between environmental conditions and microbial outbreaks. Air and wall surface RH and T were recorded hourly using HOBO® U23-001 data loggers (Onset Computer Corporation, USA)32. RH and T for the interiors of wall paintings were measured using iButton® DS1923 data loggers (Maxin Integrated, USA), with readings taken every 2 h.

Microscopic analysis of biofilms and wall paintings

Morphological features of black and white biofilms were first observed in situ using a portable microscope (Anyty 3R-MSA620WF, Beijing, China). Further examinations were conducted in the laboratory. Small sections of biofilms and detached wall paintings fragments were mounted onto stubs and coated with gold and palladium for 60 seconds before being analyzed under a field emission scanning electron microscope (SEM, FEI Quanta 450, Hillsboro, OR, USA) in a vacuum prior. To assess the viability of microbial cells, hyphae on glass slides were stained with fluorochromes. Propidium iodide (PI) distinguishes dead or membrane-damaged cells by selectively penetrating compromised membranes, binding to nucleic acids, and emitting enhanced red fluorescence for viability analysis in microbiology and cell biology. These hyphal slides were fixed in 70% ethanol at 4 °C for 30 min, stained with 4’, 6-diamidino-2-phenylindole (DAPI, 100 ng/mL) and propidium iodide (PI, 300 ng/mL), each for 10 min, then sealed with antifade solution for observation by a fluorescence microscope (Leica Microsystems, CH-9435, Germany). DAPI and PI were excited at 400 nm and 535 nm, respectively11.

DNA and RNA extraction and MiSeq high-throughput sequencing

Total genomic DNA and RNA were extracted from each sample using the PowerSoil® DNA isolation kit (MO BIO Laboratories, Inc., Carlsbad, CA, USA) and the PowerSoil® RNA Kit (MO BIO Laboratories, Inc., Carlsbad, CA, USA) following the manufacturer’s protocols. RNA was then reverse-transcribed into complementary DNA (cDNA) using a cDNA Synthesis Kit (Sigma-Aldrich, Inc., St. Louis, MO, USA). DNA and cDNA concentrations were measured with a NanoDrop® ND-2000 (Thermo Scientific Inc., USA), and integrity was assessed via 1% agarose gel electrophoresis34. DNA and cDNA were utilized as templates for the polymerase chain reaction (PCR). For bacteria, primers 338F_806R35 targeted the V3–V4 regions, while for fungi, primers ITS1F_ITS2R amplified the fungal ITS1 subregion32. The PCR mixtures composition is listed in Table S2, and the PCR program involved an initial denaturation at 95 °C for 3 min, followed by 35 cycles of 94 °C for 30 s, 55 °C for 30 s, and 70 °C for 45 s, with a final extension at 72 °C for 10 min. Each sample was amplificated three replicate then mixed for purification with a Gel Extraction Kit (AXYGEN Co., China) and quantification using a QuantiFluor™-ST Fluorimeter (Promega, USA). Utilizing the NEXTflex® Rapid DNA-Seq Kit (Bioo Scientific, US) for library preparation and nucleotide sequencing was carried out on the Illumina MiSeq platform (USA) PE300 by Majorbio Bio-Pharm Technology Co., Ltd. (Shanghai, China).

Raw FASTQ files were processed with Trimmomatic and FLASH36,37, discarding reads shorter than 50 bp without assembly. High-quality sequences were clustered into operational taxonomic units (OTUs) with 97% similarity using UPARSE (version 7.1)38. Sequences were classified into OTUs using the RDP Classifier against the SILVA Database for bacteria and the UNITE Database 7.0 for fungi, with a confidence threshold value of 70%.

Fungal isolation and biodegradation assays

Three methods were used to isolate cultivable fungal strains from the samples. Each biofilm sample was divided into three equal parts by weight. (1) Streak PDA cultivation: one subsample of each biofilm sample was directly streaked onto potato dextrose agar (PDA, Solarbio, Beijing, China) plates supplemented with ampicillin and streptomycin (each 50 μg/mL), using a sterile loop to maximize isolation of morphologically distinct colonies. (2) Spread PDA cultivation: the second subsample was vortexed in 50 ml phosphate-buffered saline (PBS) for 20 min to disperse aggregates, followed by serial dilution (10−1–10−3) and spread-plating on PDA medium with ampicillin and streptomycin (each 50 μg/mL). This approach enhanced colony separation by reducing microbial density through controlled dilution gradients. (3) Original material cultivation: to simulate original nutrients in caves for white and black biofilms and obtain the key fungal isolations, detached wall paintings and restoration materials were respectively used as the sole nutrient source (5 g/L) in agar plates, and the remaining white and black biofilm samples were inoculated onto these material-based media. Each inoculation was performed in five replicates. All plates were incubated at 25 ± 2 °C for 4 weeks until visible colonies appeared. Single colonies were then transferred onto fresh PDA plates for isolation and further experiments. Purified fungal potato dextrose broth (PDB, Solarbio, Beijing, China) solution were mixed in 70% glycerol cryotubes and stored in −80 °C.

For fungal identification, genomic DNA was extracted using the HP Fungal DNA Kit (OMEGA Bio-tek, USA). PCR amplification was employed using the universal primer ITS1 and ITS439, following the same PCR system and procedure as detailed in a previous study40. The PCR products were sent for sequencing to Tsingke Biotechnology Company (Beijing, China), and the resulting sequences were aligned with the GenBank database using a nucleotide BLAST in the National Center for Biotechnology Information (NCBI) database. The sequences with the highest similarity were identified.

The ITS partial sequences employed in this study demonstrated limitations in definitive species-level identification. Consequently, fungal strains were annotated with the taxonomic qualifier “cfr.” to indicate provisional classification, where morphological and/or molecular evidence suggests affinity to known species but requires further verification.

Evaluation of the capacity of fungal strains to degrade both organic and inorganic components of the wall paintings is crucial. Hydrolysis experiments were tested using agar plates mixed with cellulose-Congo red, gelatin, casein, and calcium carbonate (CaCO3)15, respectively, as well as glass tubes containing keratin and PBS buffer. Aiming to reveal the fungal degradation potential toward primary materials of wall paintings, including wheat straw, hemp fibers (cellulose-based), animal glue (gelatin), binders (casein), base layers (calcium carbonate), and partial fillers (keratin). After inoculating the fungal strains, the plates and tubes were incubated at 25 ± 2 °C in the dark for 14 days. Degradations were assessed by observing clear zones on the plates or turbidity in the tubes. All procedures were performed in triplicate, with specific culture medium recipes and preparation methods detailed in Table S3.

Bioinformatics and statistical analysis

All of the basic statistical analyses were conducted using SPSS 13.0. Differences among the four sampling types (B-DNA, B-RNA, W-DNA, W-RNA) were assessed using ANOVA and Kruskal-Wallis H tests with Tukey-Kramer post hoc comparisons, while differences between black and white biofilm samples were evaluated using t-tests (*p < 0.05 and **p < 0.01). The α-diversity indices, including Shannon diversity index, Simpson diversity index, Ace, Chao, and coverage were calculated using MOTHUR v. 1.30.141, and the Wilcoxon rank-sum test was used to evaluate the significance of differences in these indexes. The nutritional types and functional metabolism of HTS and culture fungal ITS sequencing were annotated using FUNGuild (V.1.0) database. Microbial community structures, ANOSIM analysis, and Redundancy Analysis (RDA) were visualized using the vegan package for R software (version 4.0.3), Spearman correlation heatmap and fungal functional analysis were generated with the ggplot2 package for R software (version 4.0.3), and the Sankey diagram was created using the ggalluvial package for R software (version 4.0.3). A maximum likelihood clustering tree was constructed from the fungal isolate sequences and their closest matches using MEGA X. The raw sequences were submitted to the NCBI Sequence Read Archive (SRA) database under accession number SUB13017891 for the high-throughput data. Fungal sequences were assigned accession numbers OQ732631-OQ732672 and are available in the NCBI database.

Results

Physicochemical characteristics and environmental measurements in the two caves

The MC of the original wall painting fragments in Cave No. 28 and Cave No. 30 was 3.13% and 3.66%, respectively, while the MC values of the restored materials in the two caves were 3.32% and 4.56% (Table S4). Overall, the MC in Cave No. 30 was higher than that in Cave No. 28. Within the same cave, the MC of repairment materials exceeded that of wall paintings. The pH values of wall painting fragments and repairment materials of both caves ranged from 8 to 9 (Fig. S2A), indicating a weak alkaline environment, with slightly higher pH observed in the restored materials. The EC values differed significantly (Fig. S2B), with wall paintings showing higher values than restored materials in both caves. Conversely, TOC was higher in restored materials (Fig. S2C), while TN of wall paintings exceeded restored materials (Fig. S2D).

The T and RH were monitored in various locations within the two caves, including plaster layers (28N-IN and 30N-IN), wall painting surfaces (28N-S and 30N-S), and cave air (28-3, 30-3, Fig. S3). In both caves, temperatures were closely related to seasonal changes and external environmental factors. The highest monthly average temperatures occurred in July, while their lowest were recorded in February (Fig. S4). RH monitoring revealed that monthly averages exceeded 70% for more than 7 months each year, posing significant preservation challenges of the wall paintings (Fig. S4). Within each cave, the monthly average RH of cave air (28-3 and 30-3) was lower than that of the plaster layers (28N-IN and 30N-IN) and wall painting surfaces (28N-S and 30N-S). During the rainy season (May–August), RH of the plaster layer consistently exceeded that of the wall painting surface in the same cave (Fig. S4).

Microscopic observation and microbial viability

Observations with a portable microscope in situ revealed distinct differences between the black and white biofilms. The black mycelia formed clusters of elongated hyphae, while the white biofilms consisted of numerous stacked, short, and stout rod-shaped filaments (Fig. 2A, B). Black biofilm samples were furry and elongated, with length exceeding 100 μm and a diameter of 5 μm (Fig. 2C), while white biofilm samples exhibited folded and collapsed mycelia with the smaller spores than black biofilm samples (Fig. 2D). SEM analysis of wall painting samples without visible microbial damage showed similar morphology to the microbial samples, with elongated hyphae and concave elliptical spores (Fig. 2E, F). Mycelioid-like morphology was also observed on the wheat straw of detached wall painting fragments (Fig. 2G), and the wheat straw near white biofilms exhibited a flocculent appearance (Fig. 2H). Fluorescence microscopy indicated that some black biofilm samples were successfully stained with both DAPI and PI fluorescent dyes (Fig. 2I, J), while others could only stain with DAPI (Fig. 2K, L). In contrast, most white biofilm samples could only be stained with DAPI (Fig. 2M–P), indicating the white biofilm samples contained a higher proportion of living cells, suggesting relatively higher viability.

Fig. 2: Microscopic analysis and observation of samples.
figure 2

A, B Portable microscopical micrographs of black biofilm and white biofilm taken in situ; SEM micrographs; the fungal microstructures of black biofilm sample and white biofilm sample (C, D), the morphology of mycelia and spores on the surfaces of the peeling murals (E, F), the morphology of mycelia in wheat straw (G) and hemp thread (H) of murals; Fluorescence microscopic micrographs after DAPI-PI stained, the liveness of hyphae in black biofilm samples was lower (IL) while in white biofilm samples was higher (MP).

Fungal community diversity and taxonomic composition by HTS

Rarefaction curves illustrating bacterial and fungal diversity, based on high-quality sequencing data are provided in Supplementary Materials Fig. S5. The nearly saturated curves confirmed that sequencing depth was sufficient for further analyses. ANOSIM analysis indicated significant differences in fungal community composition across the four sample types (R value of 0.5462, p value of 0.006), while the bacterial community composition exhibited no significant differences (R value of 0.1914, p value of 0.071, Fig. S6).

The fungal ITS subregions of all samples yielded 751,778 valid sequences, classified into 184 OTUs. Although the Shannon index values varied among groups, no significant differences were observed (p > 0.05, Wilcoxon rank-sum test, Fig. S7). The White-RNA group exhibited the highest Shannon index, indicating slightly greater fungal diversity in white mycelium RNA samples (Table S5). Fungal community composition analysis revealed OTUs belonged to four phyla, 71 families, and 95 genera, with Ascomycota being the most abundant phylum in all samples (over 95%, Fig. 3A, B). Scopulariopsis was dominant in black biofilms, while unclassified_Eurotiomycetes and Cladosporium were comparatively dominant in white biofilms (Fig. 3C, D, Student’s t test). Among the top ten most abundant fungal genera, combined ANOVA and Kruskal-Wallis H tests with Tukey-Kramer post hoc analyses demonstrated that Scopulariopsis exhibited a significantly lower mean proportion in Black-RNA samples (19.40%) compared to Black-DNA samples (46.19%) (one-way ANOVA, p < 0.05; Table S6 and Fig. S8B). The unclassified_Eurotiomycetes also showed significant differences between White-DNA and White-RNA samples (one-way ANOVA, p < 0.05, Fig. S8B), with a higher average proportion in White-DNA (36.52%) than White-RNA (23.24%, Table S6 and Fig. S8), suggesting that parts of the microbial biofilms were non-viable and that black biofilms had lower viability. Acremonium was present at relatively high proportions across all samples, comprising up to 31.54% in white biofilms (Fig. 3C, E), with no significant differences among the four sample types. Cladosporium and unclassified_Capnodiales were also prevalent in white biofilms, particularly in White-DNA and White-RNA samples (Figs. S8A and 3C). These genera, along with Neodevriesia and Engyodontium, accounted for over 85% of each sample (Fig. 3E and Table S6).

Fig. 3: Community structures of fungi detected at DNA and RNA levels.
figure 3

A, B Fungal phyla and genera; C A Sankey diagram of fungal community structure based on the internal transcribed spacer (ITS1) region at the DNA and RNA levels; D Student’s t test for the fungal genus level based on two groups (Black and White biofilms); E Bar plot showing the six most abundant fungal genera represented in black and white biofilm samples.

Correlation between microbial diversity and environmental factors

The analysis of physicochemical characteristics revealed significant distinctions between the original wall paintings and the repair materials in the two caves. Initially, Variance Inflation Factor (VIF) analysis was employed to eliminate inappropriate factors, such as MC, with a threshold of 10. RDA was then utilized to explore the relationships among sample types (W-DNA, W-RNA, B-DNA, and B-RNA), basic physicochemical properties, and environmental factors (Fig. 4). TOC and pH exhibited strong correlations with the fungal community structures of black biofilms (Black-DNA, Black-RNA), while N and EC were more strongly associated with white biofilms. T exhibited a weaker relationship with fungal community structures (Fig. 4A). A Spearman correlation heatmap analysis further clarified the relationships between the top 50 dominant fungal genera and several selected factors (Fig. 4B). EC values demonstrated the strongest correlation with unclassified_Eurotiomycetes, the dominated fungi of white biofilms. Meanwhile, pH values were closely linked to Scopulariopsis, the predominant fungal genus in black biofilms (Fig. 4B).

Fig. 4: Correlation analysis between microbial community structure and environmental factors.
figure 4

RDA analysis on the genera level of fungi A showing the correlations between the sample types and environmental factors. Spearman correlation heatmap analysis showed the associations between the top 50 dominant fungal B genera and the environmental factors. TOC total organic carbon, N total nitrogen, T temperature, RH relative humidity, EC electrical conductivity.

Diversity and biodegradation potential of culturable fungi

In total, 148 fungal colonies were isolated from black and white biofilm samples using culture-dependent methods. Following preliminary morphological classification, ITS region sequencing of 70 fungal isolates (38 derived from black biofilms and 32 from white biofilms) revealed 24 distinct species through comparative analysis with the NCBI GenBank database (≥98% sequence similarity, Table S7). The spreading PDA plates protocol yielded the highest number of sequences and species in both types of biofilms. Although original material cultivation also produced a large number of fungal colonies, most belonged to a few species. All isolated fungi belonged to 13 genera within the phylum Ascomycota (Fig. 5), with most genera aligning with those identified in HTS results, except for Waltergamsia, Botryotrichum, Trichoderma, and Neonectria. Notably, strains W4-2 and BD6-1-2, isolated via original material cultivation and streak PDA cultivation, respectively, represent the same fungal species. They exhibited 97.7% sequence similarity to the dominant fungus (unclassified Eurotiomycetes) identified by HTS in the white biofilms, further confirming these strains as the dominant fungi within the white biofilms. Additionally, these strains showed up to 98.9% sequence similarity with Onygenales sp. (Accession MT786413), previously isolated from microbial mat samples at the Maijishan Grottoes. Comparisons with more reference sequences in NCBI suggested that Onygenales sp. (MT786413) might belong to a new species within the genus Arachnomyces. However, despite Scopulariopsis being the dominant fungal genus in the black biofilms, no strains within this genus have been successfully isolated.

Fig. 5: A clustering tree representing strains of fungi isolated from the white and black biofilm samples based on the ITS gene sequences by the Maximum Likelihood method.
figure 5

Fungal colonies marked in blue circles are the main fungi in white biofilm samples, and red stars mark the fungal genera that were not detected in the HTS results.

The biodegradation capabilities of all isolated fungal strains were summarized in Table 1, with each fungus listed only once. Hydrolysis tests across various culture media revealed that each fungal strain demonstrated at least two biodegradable abilities. Of the 16 fungal strains isolated from the black biofilms, over 80% (13 strains) were able to hydrolyze cellulose. Additionally, more than 60% of these strains could hydrolyze gelatin or casein. In contrast, only eight fungal strains were capable of acid dissolution of CaCO3, while seven fungal strains had the abilities to hydrolyze keratin. Similarly, among the 18 fungal strains isolated from the white biofilms, over 80% (15 strains) exhibited cellulolytic capability. Nearly 70% of these strains could hydrolyze gelatin, keratin, or casein. However, only less than 40% (seven strains) demonstrated the ability to acid dissolution of CaCO3 (Table 1). Among all the isolated fungi, Parengyodontium cfr. album and Penicillium cfr. olsonii displayed all five hydrolysis abilities. Parengyodontium cfr. album was present in both black and white biofilm samples, while P. cfr. olsonii was isolated exclusively from white biofilm samples (Table 1). Figure 6 illustrates five fungal strains exhibiting the most pronounced hydrolysis phenomena for cellulose, gelatin, casein, calcium carbonate, and keratin. Notably, Arachnomyces sp. exhibited clear hydrolysis zones on cellulose, gelatin, and casein agar plates, along with a turbid keratin solution, while P. cfr. album demonstrated strong degradation across all five substrates. These strains emerged as key representatives of robust biodegradation abilities among the fungal isolates.

Fig. 6: The fungal strains with the most obvious hydrolysis on five different substrates medium.
figure 6

A The fungal strains displaying the ability to hydrolyze cellulose, gelatin, casein, and dissolve CaCO3. The clear zones observed on the agar plates indicate the degradation ability, which decreases progressively from left to right in the figure. B The turbidity in tubes reflected the degradation of keratin.

Table 1 All of the isolated fungal species and their deterioration abilities

Diversity and composition of fungal functional groups under different sample types

FUNGuild was used to classify the functional modes of all Maijishan samples, including both high-throughput and cultured results. At the genus level, three types of trophic modes were provided as Pathotroph, Saprotroph, and Symbiotroph. Except for the white biofilm cultured strains, trophic modes “Pathotroph-Saprotroph-Symbiotroph” constituted a significant proportion across all samples. In white biofilms, the proportion of “unknown” trophic modes was notably high, while in black biofilms, “Saprotrophs” was generally more prevalent (Fig. S9).

There were obvious functional differentiations between black and white biofilm samples (Fig. 7A). Such as, the dominant mixotrophic fungi in black biofilm samples were the functional guild “Dung Saprotroph-Undefined Saprotroph-Wood Saprotroph”, the proportion were significantly higher in black biofilm samples compared to white biofilm samples (Fig. 7B, Student’s t test, p < 0.05). Conversely, the functional guild “Animal Pathogen-Endophyte-Lichen Parasite-Plant Pathogen-Wood Saprotroph” was significantly more abundant in white biofilm than black biofilm (Fig. 7C, Student’s t test, p < 0.05). However, the guild “Animal Pathogen-Endophyte-Fungal Parasite-Plant Pathogen-Wood Saprotroph” showed a relatively high proportion in both biofilms based on HTS data, with no significant difference between them, but their proportion from black biofilm samples is significantly higher than that from white biofilm samples by cultured strains (Fig. 7D, Student’s t test, p < 0.05).

Fig. 7: Functional profiles of fungi in high-throughput and cultivation results from the Maijishan Grottoes.
figure 7

Composition of fungal functional groups at guild level (A). Differences of functional guild Dung Saprotroph-Undefined Saprotroph-Wood Saprotroph (B), Animal Pathogen-Endophyte-Lichen Parasite-Plant Pathogen-Wood Saprotroph (C) and Animal Pathogen-Endophyte-Fungal Parasite-Plant Pathogen-Wood Saprotroph (D) under different sample types.

Discussion

Microscopy remains a fundamental tool for the initial assessment of biodeterioration on wall paintings32. In this study, portable microscopy combined with scanning electron microscopy established a direct association of the black and white biofilms with fungi. Increasingly, microbial degradation of cultural heritages sites has become a key focus in studies investigating microbial viability and metabolic capability19. In contrast to a prior investigation of microbial biomass on the wall paintings of the Mogao Grottoes in Dunhuang11, fluorescence microscopy in our study revealed that higher microbial viability in white biofilms, whereas black biofilms exhibited lower viability. This finding indicates that the white biofilms on the surface of wall paintings were in a more active stage of development. The greater viability of fungal hyphae in the white biofilms poses persistent threats to the preservation of ancient wall paintings16.

This study is the first time to employ Illumina MiSeq HTS to simultaneously analyze the composition and structural characteristics of fungal communities in black and white biofilms at both DNA and RNA levels. Since microbial communities reliant on rRNA transcription are generally considered viable42. RNA level sequencing provides a robust method to evaluate microbial viability and their possible ability to degrade wall painting materials19. Consequently, HTS at both DNA and RNA levels offers a comprehensive and rigorous approach, to understand the portion of the community potentially capable of causing damage18.

Regarding the fungal community, due to limitations in existing fungal ITS gene sequence databases, numerous OTUs were assigned as unclassified fungi43. Despite the lack of significant differences in the Shannon index of fungi between different groups, likely due to the similar microenvironments of the two sampling caves, distinct fungal community structures were observed between black and white biofilms, each with unique dominant taxa. Acremonium, the most frequently identified genus across all samples, is known for contributing to black stains on wall painting surfaces12. In black biofilms, Scopulariopsis was the dominant genus, likely playing a key role in the development of black biofilms on restored areas in the Maijishan Grottoes. Scopulariopsis, which is closely associated with arthropods44, can secrete cellulase, potentially degrading wall paintings45. However, its proportions in black biofilm RNA samples were significantly lower than in the corresponding DNA samples, indicating lower viability and a lesser extent of biodeterioration. In white biofilms, unclassified_Eurotiomycetes and Cladosporium were two abundant genera. Unclassified_Eurotiomycetes has also been found in white mycelioid samples on the wall paintings from distant caves of the Maijishan Grottoes32,46. Similar to Scopulariopsis, its proportion was lower in RNA samples compared to DNA, suggesting partial non-viability of some core fungal taxa in white and black biofilms47. Other detected genera included Parengyodontium, Chaetomium, and Aspergillus in black and white biofilms, Cladosporium and Parengyodontium are significant taxa linked to wall paintings40. Aspergillus, known for its adaptability to dry and hypersaline environments, is commonly detected in tombs and underground cultural heritage sites48.

Only a small fraction of microorganisms in natural environments can be cultured under laboratory conditions49. While culture-based methods may miss significant microbial community information, they remain essential for isolating microbial strains and assessing their metabolic activity on wall paintings40. Isolating fungal strains not only facilitates the study of degradation potential but also supports research into the preservation of cultural heritage20. While the limitations of ITS sequences for identifying fungal species in some groups (e.g., Cladosporium, Penicillium, Fusarium, Aspergillus), they proved sufficient for assessing fungal diversity at genus-level50. In this study, the most abundant fungal strains isolated from black and white biofilm samples belonged to the genera of Cladosporium, Aspergillus, and Penicillium, which are frequently detected in other cultural relics as well51,52,53. Additionally, strains of the genera Botryotrichum, Cyphellophora, and Parengyodontium were isolated, all of which are associated with biodeterioration. Fungi of the genus Parengyodontium are commonly found in high salinization environments, such as churches, cathedrals, monasteries, and tombs worldwide54. Acremonium, the most abundant and widely distributed genus in our HTS results, is closely linked to microbial degradation of wall paintings12. Arachnomyces sp., identified as core taxa of white biofilms in this study, were also dominant in the white patina on wall paintings of Maijishan Grottoes Cave No. 127 and Cave No. 13332. Although Scopulariopsis has been identified as the core fungal genus in black biofilms, this presence was not equally detected through the culture-based approach, probably due to its well-known limitations55. Interestingly, white and light-colored fungi were occasionally isolated from black biofilm samples, while dark-colored fungi were obtained from white biofilm samples. HTS analysis revealed that each sample comprised at least 20% of non-dominant fungal taxa, underscoring the intrinsic complexity of biofilms as multispecies consortia with diverse metabolic functionalities. This taxonomic diversity likely enhances the ecological resilience of biofilms, enabling them to withstand environmental stressors such as desiccation, solar radiation, and climatic variability56,57. The use of PDA, a nutrient-rich medium, facilitated the cultivation of low-abundance fungal taxa, rendering them detectable under laboratory conditions58. On ancient wall paintings, competitive interactions may lead to the suppression of black fungi by white fungi; however, such ecological constraints can be circumvented under controlled laboratory conditions59,60.

Basic materials of wall paintings are highly susceptible to various fungal threats, such as dissolution, oxidation, staining, or structural damage4. Active fungi exacerbate biodegradation through metabolic processes, producing pigments, organic acids, and enzymes that degrade synthetic polymeric and natural materials4,20. Preliminary fungal degradation risk assessments often utilize specialized hydrolysis plate experiments, providing a foundation for understanding microbial threats to diverse cultural heritage materials61. Fungal strains of genera Chaetomium and Fusarium, commonly isolated from wall painting surfaces, exhibit potent cellulolytic abilities, contributing to the deterioration of cellulose and other high-strength polymers under ambient conditions62,63. In this study, most culturable fungal strains exhibited varying degrees of cellulose hydrolysis, indicating their potential to degrade plaster layers of wall paintings. Similarly, fungal hydrolysis of proteins poses a critical threat by structural damage and the loss of painting layers15. Species from genera including Aspergillus, Penicillium, Alternaria, Cladosporium, and Talaromyces have been associated with the biodegradation of proteinaceous materials64. Approximately one-third of fungal isolates demonstrated proteolytic activity, with strains of Chaetomium, Stemphylium, and Parengyodontium also exhibiting this capability. Keratin-based materials (e.g., wool and cow hair), occasionally incorporated into plaster layers as reinforcing agents in Chinese grottoes64, were known to be degraded by Cladosporium spp.65. In addition to Cladosporium, our study additionally identified species within Alternaria and Penicillium demonstrating keratin-degrading capabilities. Calcium carbonate, a common base layer material of wall paintings, was susceptible to dissolution by 40% of the fungal strains isolated in this study, with over one-third of these strains belonging to Aspergillus and Penicillium. This aligned with prior evidence that calcium carbonate dissolution may result from microbial organic acid secretion, enzymatic activity, or redox reactions15, creating the potential for degraded action53. Notably, fungal strains P. cfr. album and P. cfr. olsonii exhibited all five tested biodegradative capabilities in this study. These species have been frequently documented in cultural heritage environments with pronounced biodeterioration potential48. Similarly, Arachnomyces sp., the dominant taxon in white biofilm samples, demonstrated significant degradative activity. Collectively, the diverse biodegradative abilities of fungi threaten wall painting by degrading materials and altering microenvironmental conditions. Therefore, the detailed microbial risk assessments are crucial to guide preservation efforts.

Different functional groups or guilds of fungi are often selectively filtered into specific environments, reflecting the distinct biochemical cycles characteristic of these regions66. The exceptionally high microbial diversity has led to the development of functional redundancy hypotheses. However, as microorganisms often participate in multiple functions simultaneously, functional redundancy tends to diminish when a broader range of functions is taken into account67. In this study, the trophic modes “Pathotroph-Saprotroph-Symbiotroph” exhibited the highest abundance in over half of the samples, and saprotrophic fungi were abundant in black biofilm samples. Prolonged flooded conditions, as revealed in previous studies, promote a higher relative abundance of saprotrophic fungi, as these environments stimulate their growth. This process led to the production of various hydrolases and oxygenases, which accelerated the degradation of organic matter and nutrients68. Dung saprotroph fungi may originate from animal excretions, with the activities of squirrels and birds in Maijishan serving as their source. These fungi play a crucial ecological role in decomposing and recycling nutrients from animal dung. Additionally, they are known for producing diverse bioactive secondary metabolites and possessing a powerful enzymatic arsenal capable of breaking down complex molecules69. Consequently, their presence may pose potential threats to the preservation of wall paintings.

The biofilm observed on the cave wall paintings was a complex structure, allowing selective microbial members to cooperate and ensure the survival of the community as a whole. The ecology of colonizing biofilms is influenced by many factors6. Within these biofilms, microorganisms form a metabolically cooperative network that optimizes the utilization and recycling of nutrients from the substratum, decaying plant and animal matter, animal feces, and other materials deposited from the atmosphere onto the surfaces8. Caves represent unique environments that demand specialized adaptations for microbial growth. The microbiome of cave temples demonstrates resilience to harsh environmental stresses70. Climatic conditions, particularly air temperature and relative humidity, significantly influenced fungal communities, and are correlated with ecological indicators such as species diversity and richness indices53. These microorganisms play vital roles in biogeochemical processes, offering critical insights for conservation management71. In our study, clear distinctions were observed between the original wall paintings and later restoration materials in the two caves examined. The EC values of the original wall paintings were higher than those of restored materials, likely due to a prolonged exposure and greater salinization on wall paintings. The TN contents were higher in wall paintings, possibly due to the use of natural adhesive with the higher nitrogen contents during the original painting process2. Conversely, the TOC contents were higher in the restored materials, which primarily consisted of high-carbon and high-fiber substances like wheat straw and hemp thread. These differences in material composition provided varied nutrient sources that favored fungal growth4. Globally, pH and organic carbon are recognized as key factors influencing microbial diversity and niche distribution in caves72. In our study, the differences in EC and pH between original wall paintings and restored materials might contribute to the distinct formation of white and black biofilms, suggesting distinct selective pressures based on material composition, indicative of “variable selection”73. White biofilms, which posed a major issue in the caves studied (Cave No. 28 and Cave No. 30), have also been reported in other geographically distant caves of Maijishan Grottoes32. The unique environmental conditions of the Maijishan Grottoes, coupled with the distinctive techniques and raw materials used in the creation of these wall paintings, likely contributed to the outbreak of white biofilms. This phenomenon highlights a convergence of environmental variables, aligning with the concept of “homogeneous selection”30.

Climatic conditions play a pivotal role in shaping cave microenvironments by influencing water flux, temperature, ecosystem productivity, and the composition of flora and fauna. These factors directly affect pH, salinity, quantity, and quality of organic matter in caves. Biagioli et al. highlighted the dominance of drought-tolerant fungal taxa in arid habitats, which attributed to their exceptional drought tolerance25. Moisture is a critical driver of microbial damage to cultural heritage sites14, and fungi are more likely to proliferate when RH exceeds 75%43. In Maijishan Grottoes, during the typical rainy season (May to September), water accumulates on cliffs and seeps into caves through cracks. This study observed that the average RH in the surroundings of both caves approached 70%, with RH inside the caves exceeded 70% for more than half the year, and these conditions facilitated fungal growth. Furthermore, temperature fluctuations and high humidity lead to condensation on wall painting surfaces, increasing local RH and triggering microbial outbreaks26,46. Notably, fungal growth on drywall was primarily driven by surface moisture, particularly the presence of liquid water74. In the studied caves, the MC of both restoration materials and ancient wall paintings consistently measured below 5%, indicating minimal liquid water availability. Because of this, part of the white and black biofilms exhibited partially inactive mycelia. Cave No. 28 and Cave No. 30, which have undergone restoration, are situated in lower positions, making them more accessible for visitors, worship and animals. The increased human activity, wildlife presence, and restoration interventions disrupt the microenvironment balance29,75, potentially facilitating “dispersal” of microbial communities within the caves31. Restoration materials may inadvertently introduce new microbial spores, provide abundant nutrients for fungal colonization, as well as significant amounts of moisture during restoration76, all of which can promote fungal proliferation and contribute to black biofilms outbreaks. This scenario poses risks of renewed biodeterioration and influences the microbial diversity of wall paintings. The intensified salinization, combined with a lack of liquid water, may inhibit fungal growth and cause the decline or death of core fungal taxa like Scopulariopsis spp. As a result, part of the black biofilms observed may represent remnants of previous microbial outbreaks77.

The development of visible microbial damage on the surface of wall paintings in grottoes is a complex process involving biological, physical, and chemical factors. By integrating sporadic evidence with existing reports, we explained the reasons behind the colonization of white and black biofilms on the wall paintings and restoration materials, respectively. Fungi played an important role in the biodeterioration of wall paintings, as they can hydrolyze the basic materials of wall paintings, such as cellulose, gelatin, casein, and keratin, which indirectly altered the microenvironment. In addition, animal and human activities might affect the microenvironment and introduce new sources of microorganisms through “dispersal”. Over time, the changing microenvironmental conditions selectively favored the growth of specific fungal taxa, leading to the outbreak of dominant taxa. Arachnomyces spp. were predominantly selected on wall paintings, while Scopulariopsis spp. dominated restored materials, through a process of “variable selection”, resulting in visible white and black biofilms. Furthermore, the outbreak of Arachnomyces spp. on wall paintings in different caves of the Maijishan Grottoes was attributed to “homogeneous selection”, driven by suitable microenvironment conditions and available nutrients (Fig. 8). In conclusion, “selection” emerged as the pivotal factor shaping the microbial damages just as biofilms in this case study.

Fig. 8: Schematic representation of biofilm formation processes on the murals at Maijishan Grottoes.
figure 8

The schematic diagram of microbial colonization, biodeterioration and the corresponding biochemical processes illustrating the effects of various factors on the murals.

For the sustainable conservation of cultural heritage, it is critical to comprehensively evaluate the associated microecosystems, including the factors influencing the structural and spatial patterns of their microbiota. Studies on cave microbial communities have provided significant insight into microbial sensitivity to abiotic factors and microclimatic fluctuations driven by environmental conditions and local tourism activities75. Consequently, understanding microbial diversity, characterizing dominant taxa, predicting microbial function, and assessing their ecological responses to environmental variables are indispensable. Such investigations help address the uncertainties surrounding the long-term preservation of cultural heritages, especially under the pressing challenges posed by climate change.