The evolution of specific mate recognition systems is often central for successful sexual reproduction [1]. Once males and females have located each other, individual mating preferences or competition for access to mates may lead to suboptimal decisions during courtship and mating [2, 3]. The willingness to mate is for example exploited by certain insect-pollinated flowers [4,5,6], which use sexual mimicry to attract pollinators by resembling the opposite sex visually and/or chemically. Exploitation of mate recognition systems can be highly advantageous for obligate pathogens as it increases the chance of pathogen transmission by ensuring contact with new potential hosts of the preferred species [7].

Obligate parasites and pathogens are under strong selection pressure to find a host to continue or complete their life-cycle [8]. This has led to the convergent evolution across parasitic phyla of behavioural manipulation that increases transmission to new hosts [9,10,11,12,13,14,15]. Pathogens may also behaviourally manipulate their hosts without residing inside the body of the host [16], for example through host-consumption of pathogen-secreted substances [17] or via direct injection of chemical cocktails by certain parasitoids [18]. A widespread, but more subtle behavioural manipulation is attraction of potential new hosts or vectors with volatile compounds by certain entomopathogenic bacteria [19], nematodes [20], fungi [21, 22], beetle-tapeworms [23,24,25], and plant viruses [26]. Such attraction extends the phenotype of pathogens in the infected host [10, 27], where expression of pathogen genes ultimately leads to the altered behaviour of uninfected hosts from a distance. Although the proximate mechanisms in many cases still are largely elusive [16, 28, 29], a combination of extended phenotype pathogenic traits and exploitation of host compensatory responses are thought to control altered host behaviour [30].

The entomopathogenic fungus Entomophthora muscae represents a unique example in that it not only behaviourally manipulates its immediate housefly (Musca domestica) host, but also appears to manipulate uninfected conspecifics. Prior to death, infected male or female houseflies are manipulated to seek out elevated positions and die with wings spread out in a specific posture conducive for active discharge of infectious fungal conidia. The fungus begins sporulation immediately after the death of its host, with conidia discharge having a bell-shaped distribution that ends within the first 24–36 h post mortem [31,32,33]. Male and female flies in the vicinity may become infected from being directly hit by a conidium (spore) or via contact with already-discharged conidia that sometimes form a halo on the surface around a conidia-shooting cadaver [32].

The behavioural manipulation by E. muscae continues after the death of female hosts, as the fungus appears to use sexual mimicry to lure healthy males to attempt mating with these cadavers [34], even though their efforts are only rewarded with deadly fungal conidia (Fig. 1a). In houseflies, courtship starts with the male jumping on top of the female in a so-called “mating strike”, in which the male places his front legs at the base of the wings of the female, which in turn instantly spreads her wings horizontally from the body, in a pose resembling flight position [35, 36]. Both males and females are considered as choosing sex in houseflies because males vary considerably in their mating efforts and females can exert mating choice by kicking off courting males [37]. Housefly males are able to distinguish between male and female cadavers also when covered in infectious E. muscae conidia [38], and appear to readily initiate courtship and mating strikes towards infected female cadavers [34].

Fig. 1: Male house fly mating attempts towards E. muscae infected cadavers.
figure 1

a Healthy male house fly attempting to mate with E. muscae sporulating cadaver. Fungal growth is seen as white bands (conidiophores with conidia) extruding from the abdomen of the dead female. The actively discharged conidia are covering large parts of the wings and body of the female cadaver and also create a halo of conidia around the cadaver (Photo: Filippo Castelucci). b Male mating activity towards uninfected freeze-killed (−Em) or infected (+Em) E. muscae-killed cadavers in early (3–8 h post death) and late (25–30 h post death) sporulation stages. Individual data points are shown differentiated by colour and shape and black centrality line depicts the mean (n = 15 per treatment). c Male houseflies used in mating activity experiments towards female cadavers (Fig. 1b) or male cadavers (Supp. Fig. 4), were assessed for successful E. muscae infection. Significant differences using Fisher’s exact test are shown (n = 11–17 flies per treatment). d Mate choice experiment showing total mating attempts towards both cadavers when given a choice between two female cadavers that both were either uninfected (−Em, −Em), one uninfected and one infected in early sporulation stage (−Em, +Em), or one uninfected and one infected at late sporulation stage (−Em, +Em) (n = 19 per treatment, except n = 9 for −Em,+Em late sporulation cadavers). Horizontal black lines show the mean.

We sought to test the hypothesis that E. muscae lures male flies by changing the chemistry of infected female cadavers. Specifically, we examined two fungal attraction pathways: (1) Infection with E. muscae amplifies the signal of the female housefly sex pheromone, which creates a sensory bias so that males respond to a quantitatively supernormal stimulus (amplified chemical attraction), and (2) E. muscae infected cadavers synthesize new chemical cues not normally occurring in female houseflies so that males respond to a qualitatively improved signal (novel chemical attraction). Mate recognition in houseflies is normally governed by both visual and chemical cues [39, 40], involving the female sex pheromone that consists of cuticular hydrocarbons (CHC) and non-hydrocarbons [41,42,43,44]. Most insect CHCs are only perceived at close range [45]; however, chemical modification can increase volatility and result in attraction over longer distances as shown in the fruit fly (Drosophila melanogaster) [46].

We evaluated the potential amplified and novel chemical attraction pathways in three steps. First, we quantified male sexual attraction to fungus-infected cadavers and fungal conidia using behavioural assays, and we determined whether cadaver attraction leads to more infected flies. Second, we measured the physiological mechanisms enabling males to detect chemical cues from infected cadavers using electroantennography (EAG). Further, we characterized the volatile cues eliciting male mating attraction using chemical analyses (GC–MS). Third, to assess if the fungus E. muscae is making the chemical cues, we performed transcriptional profiling (RNAseq) of expressed genes in biosynthesis pathways of targeted chemical volatiles.

Materials and methods

Fungal culture and insect rearing

Houseflies (wildtype Musca domestica, strain 772a) were obtained as pupae from the Department of Agroecology, Aarhus University, Denmark. Flies were separated into sexes within 24 h of eclosion and kept in same-sex groups of around 30–50 flies in cylindrical plastic containers (diameter: 7.5 cm, height: 8 cm). Flies were continuously supplied with water and 1:1 (V/V) skim milk powder and sugar. Cages were kept in a rearing room at a 16:8 h light/dark rhythm at an average temperature of 21 ± 1 °C.

Houseflies were infected with Entomophthora muscae (isolate no. KVL21-01, University of Copenhagen, Section for Organismal Biology Entomopathogenic fungus culture collection) originally isolated from a housefly caught in a cow stable (“Birkedal”, 55.835571, 12.154350). The fungus was continuously maintained inside housefly hosts as previously described [7]. Infected flies were kept at 19.5 °C and a 14:10 h reversed light-dark rhythm with the light ending at 10:00 AM. The fungus E. muscae induces death in infected flies synchronized with the end of the photoperiod after six or seven days [47]. Late cadavers have a distinct smell not present at early stages (pers. obs. A. Naundrup and H. H. De Fine Licht). In order to experimentally study cadavers at two different stages of sporulation, cadavers were divided into two groups: early (equivalent to an early sporulation stage within 3–8 h post mortem), and late (equivalent to a late sporulation stage 25–30 h post mortem). To obtain late sporulation cadavers, infected fly cadavers were placed in a chamber with 85% relative humidity (RH) immediately after death to prevent desiccation. Control treatments consisted of uninfected housefly cadavers killed by freezing for 6 min at −24 °C and otherwise treated similar to infected cadavers.

Mating activity experiment

To determine male housefly sexual attraction towards E. muscae infected cadavers, an uninfected unmated male was anaesthetized by cooling at 5 °C for 2 min and placed within a EtOH-rinsed glass Petri dish arena (diameter: 90 mm, height: 16 mm), together with a cadaver fixated with petroleum jelly. Late sporulation cadavers were either placed in the arena directly before the experiment (treatment = +Em) or allowed to shoot spores for 20 h prior to the assay creating a halo of spores around the cadaver (treatment = +Em,+Conidia halo). Fifteen replicates of each cadaver treatment were conducted at 21 ± 1 °C under ambient light (16:8 h light/dark rhythm). Male-female and male-male trials were conducted at Zeitgeber time (ZT) 12:45 to ZT 20:00 and from ZT 11:30 to ZT 20:00, respectively, with ZT 00:00 being the onset of the 8 h dark period. The male fly was filmed for 40 min, and the following behaviours were noted in the software BORIS v. 6.2.4:[48] A mating attempt, defined as a “mating strike” when a male jumps on top of a female usually from behind [35]; Number of physical contacts between male and cadaver (excluding mating attempts), ranging from touching of legs or wings to the male crawling over the cadaver; Time spent inside a 16 mm radius of the cadaver by any body part of the male.

In order to determine successful E. muscae infections from associating with cadavers during assays, the living male subjects were anaesthetized with CO2. Then incubated individually in clean fly cages on a 1:1 skim milk powder sugar diet, supplied with clean water, immediately after each 40 min of observation. Flies were monitored daily for 10 days or until death and checked for visible fungal growth in the abdominal intersegmental membrane, characteristic of E. muscae infection.

Mate choice experiment

Mate choice experiments were performed as a two-choice assay in polystyrene Petri dishes (diameter: 92 mm, height: 16 mm). Two cadavers, each either infected or control,were fixated with petroleum jelly with the ventral side downwards and head facing away from the centre to either side of the arena. A healthy unmated male was placed in the centre of the arena and behaviours monitored for 40 min similar to the mating activity experiments with 9–19 replicates per treatment.

Conidia attraction experiment

Experiments investigating housefly attraction to E. muscae conidia were performed as two-choice assays between two sticky trap discs exposed for 24 h at 85% RH to three male or female cadavers that were either E. muscae infected or uninfected freeze-killed controls (−24 °C, 6 min). The sticky trap discs were placed in polystyrene Petri dishes (diameter: 92 mm, height: 16 mm) with a 1 cm diameter hole in the centre of the lid and wrapped in Parafilm (not covering the hole) to eliminate visual cues, and placed inside a Plexiglas cage (dimensions: 30 × 30 x 30 cm). With 106 replicates, four unmated flies of the same sex (5–20 days old) were allowed to choose between traps for 24 h, whereafter the number of flies in each trap was counted and a preference index (PI) calculated [49], where A = total number of flies in trap with conidia, and B = total number of flies in trap with control:

$$Preference\;index = \frac{{(A - B)}}{{(A + B)}}$$

A positive PI indicates a preference for E. muscae conidia, whereas a negative PI indicates preference for the control. Flies that did not make a choice to either trap were excluded from analyses.

Y-tube olfactometer choice test and headspace sampling

Male house fly attraction to volatile (headspace) samples was tested in a glass Y-tube olfactometer (17 cm long base, 9 cm long arms at 90° angle, inner diameter 2 cm). Humidified, charcoal-filtered air was supplied to each arm at 0.4 L/min with an air pump (KNF Neuberger, model NMP 830 KNDC). The glass Y-tube was washed, rinsed with ethanol (70%), and heated at 120 °C for 2 h before each day of experiments. Headspace samples were collected by dynamic headspace sampling (aeration) for 20–22 h starting 2–4 h post mortem. To obtain sufficient amounts of volatiles for analysis, five infected or five control cadavers of the same sex, and blank samples without cadavers, were sampled simultaneously. Cadavers were placed in a cooking bag (Toppits), and charcoal filtered air was pushed through the bag in a closed-loop with an airflow of 0.75 L/min. Samples were collected with a Porapak Q 50/80 adsorbent (Markes International) filter, eluted with n-hexane (2 × 500 µl) into 2-mL glass vials and concentrated under a gentle stream of N2 to a total volume of 40 µL before analysis. Sample volumes of 10 µL were loaded onto a filter paper (1.5 cm × 1 cm), and used immediately after the solvent had evaporated. Odour sources were only used for a single fly in the Y-tube choice test and the position of control and cadaver odour sources were alternated between each fly tested. Healthy, unmated flies were allowed to acclimate for 30 min before being introduced at the base of the olfactometer. A response choice was noted once a male entered past 5 cm in one arm within 3 min. Y-tube choice tests were made at room temperature under diffuse dimmed light between ZT 16:00 and 20:00 over four separate days. To account for time of day, data were analysed by calculating a preference index of flies that made a choice per hour with 3–12 flies tested per hour over 13 h (n = 90 flies in total).

Gas Chromatography–Mass Spectrometry (GC–MS) of cuticular compounds

House fly cuticular compounds and hexane-soluble fungal metabolites from early and late cadavers, conidia, and corresponding controls from both sexes were extracted in 2-mL vials with 500 µL n-hexane (for liquid chromatography LiChrosolv, Sigma-Aldrich) for 5 min (n = 5, except n = 2 for female-derived conidia). Hexane extracts were concentrated under a steady stream of N2 to a total volume of 40 µL before analysis. Conidia-samples were obtained by allowing a cadaver to shoot conidia into a 2 mL vial at 85% RH for 24 h.

Extracts were injected into an Agilent 6890 N GC equipped with a DB1 MS-UI column (60 meter length, 0.25 mm inner diameter, 0.25 µm film thickness, Agilent Technologies) coupled to a 5975 inert Mass Selective Detector (Agilent Technologies). Splitless injection (0.5 min) was applied (injector temperature 325 °C). The oven was programmed from an initial temperature of 200 °C for 2 min and a ramp up of 8 °C/min to 340 °C and held for 15 min. Helium was used as the carrier gas with a linear velocity of 35 cm/s. The electron ionisation mass spectra were recorded at 70 eV and samples were analysed in MSD ChemStation v. D.03.00.611 (Agilent Technologies). Retention times were related to an injected Kovats linear alkane mixture of carbon chain length C8–C40 and the linear retention index for each peak was calculated [50]. Compounds were tentatively identified based on a comparison of mass spectra with the library database NIST14 and by comparing Kovats retention indices, mass spectra and diagnostic ions with those in previously published analyses [51,52,53,54,55,56,57,58].

Gas Chromatography–Mass Spectrometry (GC–MS) of volatile compounds

Five replicate headspace samples (2 µL) were injected into a 7890B GC/5977 A GC/MSD system (Agilent Technologies) with a DB-Wax capillary column (60 m length, 0.25 mm inner diameter, 0.25 µm film thickness). Splitless injection (0.5 min) was applied (injector temperature 225 °C). The oven was programmed from an initial temperature of 30 °C for 3 min and a ramp up of 8 °C/min to 225 °C and held for 10 min. Helium was used as carrier gas with a linear velocity of 35 cm/s. The electron ionisation mass spectra were recorded at 70 eV, and compounds were tentatively identified as previously described. Compounds found in at least three out of five samples for each treatment and not found in blank control samples, were included.

Electrophysiological recordings (EAG & GC-EAD)

To measure male house fly antennal responses to infected and uninfected cadavers and chemical compounds, we used Electroantennography (EAG) and Electroantennographic Detection (GC-EAD) recordings on antennae of whole male houseflies mounted in a cut pipette tip. Pulled glass capillaries with a silver wire were filled with Ringer solution (Merck Millipore, product no.: 115525) and placed on the tip of the antenna funiculus and in the eye as recording and ground electrodes, respectively (Supplementary Fig. 16). Antennal responses were digitized with an IDAC-2 system (Syntech, Kirchzarten, Germany) and measured using the software GcEad 2014 v 1.2.5 (Syntech). Carbon filter-purified air was humidified and delivered at 1.5 L/min to the antennae via a glass tube. For EAG recordings, pulse stimuli (0.5 s puffs) were given with glass Pasteur pipettes containing an entire live fly or cadaver. Each tested fly equipped with electrodes on the antenna and in the eye received puffs from a live female, early control, early infected, late control, and late infected in that order (n = 10, except n = 6 for early cadavers).

For GC-EAD recordings, 2 µL of E. muscae-infected female cadaver headspace samples (n = 7) were injected manually into a 7890 A GC System (Agilent Technologies) with a DB-Wax capillary column (30 m length, 0.25 mm inner diameter, 0.25 µm film thickness). The methodology followed that previously described for GC–MS of volatile compounds with the following modifications: injector temperature was 215 °C, the oven temperature at 225 °C was held for 20 min, and the carrier gas linear velocity was 45 cm/s. The GC was coupled to a flame ionization detector (FID) and an EAD, where whole flies were mounted with one antenna fitted with a recording electrode and a ground electrode in the eye (n = 3 flies, each fly was tested with three odour samples, except one fly that was tested with a single sample). Retention indices of response-eliciting peaks were determined based on injected linear alkane mixture of carbon chain length C8-C20 and compared to that of the GC–MS headspace injections. Ethyl octanoate was identified by injection of a synthetic standard and 100 ng ethyl octanoate was puffed on the heads of mounted flies to confirm antennal EAD-activity prior to recording EAG responses. Only compounds consistently eliciting a response across all seven replicate injections were counted. For both EAG and GC-EAD, responses were measured as the amplitude of depolarization in millivolt (mV).

RNA Sequencing and transcriptomic analysis

Five replicate female early and late cadavers and corresponding controls (10-11 days old at the time of death) were snap-frozen in liquid N2 and stored at −80 °C until extraction. For extraction, samples were crushed with a mortar and pestle and further homogenized with glass beads in a TissueLyzer (Qiagen). Total RNA was extracted using phenol/chlorophorm/isoamylalcohol phase-separation followed by a GeneJET RNA Purification Kit (Thermo Scientific), according to the manufacturer’s instructions. PolyA-mRNA library preparation and 100 bp paired-end un-stranded DNBseq sequencing were conducted by BGI Europe A/S. Reads with low quality were filtered with a maxEE value of 2, the first 10 bp of each read were trimmed, and all reads >35 bp were kept using the function “filterAndTrim” in the R-package “dada2” [59]. Reads were mapped to a concatenated reference consisting of house fly (Musca domestica, ncbi version 2.02, RefSeq: GCF_000371365.1) and E. muscae transcripts (European Nucleotide Archive (ENA) at EMBL-EBI, accession no. ERZ2299657) using the software kallisto [60] version 0.46.1. Differential expression analysis was conducted in R version 4.0.3 using the package “DEseq2” [61] requiring a log2 fold-change >1 and a p value <0.001 adjusted for multiple testing to designate significant differential expression per gene. Samples were analysed pairwise as infected early vs early control and infected late vs late control for house fly genes, whereas E. muscae transcripts were compared between early and late infected cadavers.

Statistical analysis

Mating activity experiment and mate choice experiment were analysed with a Kruskal–Wallis rank sum test. Pairwise comparisons were performed with a Dunn’s test for multiple comparisons with a Bonferroni adjustment. Male E. muscae infection following mating activity assays were analysed using Fishers Exact tests. All statistical analysis were performed in R version 4.0.3. Conidia attraction was analysed with logistic regression as a function of trap treatment (conidia or control), the choosing sex, the sex of the conidia-discharging cadaver, and house fly age as a random factor. Y-tube experiments were analysed using the exact binomial test.

Signal amplitudes of electroantennographic recordings were log-transformed and tested for normality with a Shapiro-Wilk test. The amplitudes were analysed with a linear mixed model using R packages lme4 [62] and emmeans (ver 1.7.2), and milli-Volts (mV) were described as a function of treatment with the mounted fly as a random factor similar to [63]. Tukey’s Posthoc tests with a Bonferroni correction were used for pairwise comparisons. Principal component analysis was calculated on fourth-root transformed total ion chromatogram (TIC) abundance counts of compounds found in cuticular hexane extracts and extracts from conidia, using packages FactoMineR and Factoextra in R [64], version 4.0.3. Compound peaks that contained co-eluting compounds were excluded from PCA analysis.


Male houseflies attempt mating with fungus-infected cadavers and are attracted to E. muscae conidia

We first performed mating activity experiments to verify increased male mating attempts towards E. muscae-infected female cadavers compared to uninfected cadavers [34, 38] (Fig. 1a, Supplementary Figs, 1, 2). Male mating attempts were significantly higher towards cadavers in late stage of sporulation (Kruskal–Wallis (K–W), χ2 = 14.095, p = 0.0009, Fig. 1b) compared to controls (Dunn’s, Bonferroni adjusted p = 0.0226) and compared to infected cadavers surrounded by a halo of infective conidia (Dunn’s, Bonferroni adjusted p = 0.0009). This increase in sexual attraction appeared sex-specific; males mated more frequently only with female cadavers (Supplementary Fig. 4), confirming previous observations [38]. Males neither spent more time near, nor physically touched (non-sexual contact) fungus-infected cadavers more often than control cadavers (Supplementary Fig. 3). This was irrespective of whether the cadavers were in early (3–8 h post mortem) or late (25–30 h post mortem) sporulation stages (Supplementary Fig. 3). To confirm that manipulation of male sexual behaviour is an effective means of increasing fungal transmission, the male subjects were incubated for 10 days, which showed that 73.3% became infected after exposure to late sporulation cadavers compared to 15.4% of males exposed to early sporulation cadavers (Fig. 1c). Increased fungal infection correlated with cadaver mating attempts, as more male flies became infected when exposed to a female late-sporulation stage cadaver compared to a male late-sporulation stage cadaver (Fig. 1c). In another experiment, when we allowed a male to choose between an uninfected and infected female cadaver present together in a small arena, we did not see a significant difference in the number of mating attempts towards infected and uninfected cadavers (Supplementary Fig. 5). However, a significantly higher number of total mating attempts to either of the two cadavers in the arena was observed if just one of the cadavers was in late stage of sporulation (K–W χ2 = 15.01, p = 0.0005, Fig. 1d), which suggests that the presence of mating cues from late-stage sporulation female cadavers in the small arena stimulates male sexual behaviour.

During our behavioural studies, we occasionally observed males being attracted to conidia and approaching these on artificial surfaces even in the absence of a cadaver. Here, the males would extend their proboscis and taste E. muscae conidia (Supplementary Fig. 1). To determine whether volatiles from conidia alone were sufficient for attraction, we used a two-choice assay consisting of visually obstructed sticky traps inside a cage (Fig. 2a). Both male and female flies were caught most often in traps with E. muscae conidia (logistic regression, n = 106, Z = 3.52, p = 0.0004, Fig. 2b), regardless of the sex of the conidia-discharging cadavers. We then investigated whether the full volatile blend from E. muscae cadavers was attractive to male houseflies using Y-tube behavioural assays (Fig. 2c). Male houseflies were attracted to the complete cadaver headspace samples at a significance level of 0.1 (exact binomial test, p = 0.0725, Fig. 2d), which supports that male houseflies respond to volatiles from E. muscae infected cadavers.

Fig. 2: Behavioural responses to E. muscae volatile compounds.
figure 2

a Drawing of conidia attraction assay. b Preference index of housefly attraction to volatile chemicals being emitted from visually obstructed sticky-traps with (+Em) and without E. muscae conidia (−Em). Size of circles and numbers within show number of 24-hour trials resulting in a given preference index (four male or female houseflies per trial, 106 trials in total). c Drawing of Y-tube assay set-up. When the test fly reached 5 cm into either arm a choice was noted. d Preference index of male housefly attraction in Y-tube experiments to volatile blends from E. muscae infected female cadavers (+Em) vs. volatiles from uninfected control female cadavers (−Em). Size of circles and numbers within show number of one-hour trials (n = 13) resulting in a given preference index (3–12 male flies per trial, 90 flies in total). Solid black vertical lines designate mean preference index.

E. muscae killed housefly cadavers have distinct chemical profiles of volatiles and cuticular hydrocarbons

To investigate the volatile-mediated attraction towards conidia and infected cadavers we used electroantennography (EAG) (Fig. 3a, b). Male houseflies showed significantly higher antennal responses to air puffs from glass Pasteur pipettes containing conidia (Linear mixed effects model (LMM), t = 15.73, p = 0.0002, Fig. 3a), and E. muscae-infected early sporulation cadavers compared to either live (LMM, t = 3.57, p = 0.0155, Fig. 3b) or dead control flies (LMM, t = 3.91, p = 0.0112, Fig. 3b, Supplementary Fig. 6) of equal age and sex. The antennae also responded significantly more to E. muscae-infected late cadavers compared to control cadavers (LMM, t = 2.65, p = 0.0487, Fig. 3b), showing that male houseflies are able to detect volatiles from E. muscae-infected cadavers.

Fig. 3: Antennal responses to E. muscae volatile compounds.
figure 3

a Male antennal EAG responses (mV) to volatile chemical blends from E. muscae conidia and control (n = 10 per treatment). b Male antennal EAG responses (mV) to volatile chemical blends of uninfected (−Em) or infected (+Em) female E. muscae-killed cadavers in early (3–8 h post death) and late (25–30 h post death) sporulation stages (n = 10 per treatment, except n = 6 for early sporulation cadavers).

To investigate the chemical compounds responsible for the male housefly antennal responses to conidia and sporulating cadavers, we analysed cuticular extracts (in hexane) of both early (3–8 h post mortem) and late (25–30 h post mortem) infected and uninfected houseflies (Supplementary Fig. 7, 9). We observed differences in various long-chained alcohols and esters of infected and control cadavers involving both new compounds and altered levels of naturally present compounds (Fig. 4a), which in principal component analysis (PCA) clustered according to infection status (early vs. late) and housefly sex (Fig. 4b). Many of these compounds, including known housefly cuticular hydrocarbons, increased in amount from early-stage to late-stage sporulation, although the housefly host was dead throughout all sporulation stages (Fig. 4a, Supplementary table 1).

Fig. 4: Cuticular chemical profile of E. muscae sporulating houseflies.
figure 4

a Tentatively identified compounds in cuticular hexane extracts of early (3–8 h post death) and late (25–30 h post death) female and male sporulating cadavers and conidia. Numbers in table denote fold change in intensity of total ion chromatogram (TIC) compared to corresponding uninfected controls, so early treatments are compared to early controls and late treatments are compared to late controls. The symbol + denotes presence in the sample, but not in corresponding control (+: <5.5 × 107, ++: 5.51 × 10 < 5.5 × 108, +++: 5.51 × 108 < 5.5 × 109, ++++ >5.51 × 109 Total Ion Chromatogram (TIC)), and − denotes absence, i.e. only found in uninfected control samples and shown as fold change between early and late in two right-most columns. Compounds highlighted in blue have previously been identified to stimulate male sexual behaviour in houseflies. For each compound the retention index (KI, DB-1 column) is given (n = 5 per treatment, except n = 2 for female +Em conidia). b Principal component analysis (PCA) of cuticular and conidia extracts (hexane) shown in (a). Sample groups are colour-coded according to treatment and the outer-most samples connected by a solid line and background shown with shaded colour to show variation between replicate samples.

The alkene (Z)-9-tricosene has been proposed to be the primary female housefly sex pheromone component [41], although other findings report that several house fly strains contain no (Z)-9-tricosene [43, 65, 66]. We only found a compound with matching GC–MS properties to (Z)-9-tricosene in late sporulation males and females, and no traces in uninfected females indicating that our housefly strain does not naturally contain (Z)-9-tricosene (Fig. 4a). Methyl-branched alkanes, most likely 2-methyloctacosane, 2- and 4-methyltriacontane and 11- and 13-methylheptatriacontane increased in amount in late sporulation cadavers (Fig. 4a). These compounds have previously been found to stimulate male sexual behaviour [40, 42]. The compounds 2-methyloctacosane and a methyl-branched heptatriacontane have been shown to yield small non-significant increases in mating attempts [42], whereas 2-, 3- and 4-methyltriacontane have been found to significantly increase male mating attempts [42]. These compounds did not increase in abundance between early and late uninfected control cadavers (Fig. 4a), showing that the increase in late infected cadavers is not due to natural decomposition processes. Altogether, these findings support that new compounds and higher amounts of female house fly cuticular compounds increase male sexual behaviour towards female E. muscae-infected cadavers.

To analyse volatile compounds potentially mediating medium to long-range chemical attraction, the air surrounding cadavers (headspace sampling) was analysed (Supplementary Figs. 8, 10). Infected fly cadavers had markedly different volatile profiles than uninfected control cadavers of similar age (Fig. 5a, Supplementary table 2), whereas headspace from infected male and female cadavers were largely similar. Twenty-two additional compounds, dominated by sesquiterpenes and including an ethyl ester, ethyl octanoate, were repeatedly found in headspace from infected males and females but not controls (Fig. 5a). The largest single component of any E. muscae headspace sample, sesquiterpene 3 (Supplementary Fig. 12), was also found in headspace samples of uninfected females (Supplementary Fig. 8), but not males (Supplementary Fig. 10).

Fig. 5: Volatile chemical profile of E. muscae cadavers and male antennal detection.
figure 5

a Tentatively identified (ident.) compounds found in volatile samples of uninfected (−Em) and infected (+Em) male and female cadavers sampled by collecting the ambient air (headspace) of cadavers or conidia over 24 h. The symbol + denotes presence in the sample (+: < 5.5 × 107, ++: 5.51 × 107 < 5.5 × 108, +++: 5.51 × 108 < 5.5 × 109, ++++ > 5.51 × 109 Total Ion Chromatogram (TIC)), and – denotes absence. b Male antennal detection of individual volatiles from infected female cadaver separated and detected using GC-EAD. Top: male antennal EAD response. Bottom: GC-FID separation of volatile compounds. Compounds marked in blue (a) correspond to volatile compounds highlighted with stippled lines that consistently gave an EAD response in all replicates.

Having determined that infected cadavers have altered cuticular and novel chemical components compared to uninfected cadavers, and that fly antennae exhibit stronger responses to the odour of infected cadavers, we next sought to determine the compounds that trigger an antennal response (GC-EAD, Supplementary Fig. 16). None of the long-chain hydrocarbons from cuticle extracts elicited consistent GC-EAD antennal responses, whereas ethyl octanoate, two putative sesquiterpenes and two compounds with unknown structure from headspace samples repeatedly elicited GC-EAD-responses in all replicates (Fig. 5b, Supplementary Fig. 11, 13-15). When tested alone as a synthetic standard in Y-tube assays, ethyl octanoate did not elicit any behavioural response from male houseflies irrespective of dosage (20–2000 ng) tested (exact binomial tests, p > 0.1 in all cases), indicating that ethyl octanoate alone is insufficient to trigger behavioural attraction.

All E. muscae genes in the mevalonate sesquiterpene biosynthesis pathway are actively expressed in fungus-infected cadavers

Our results show that unique volatiles from female E. muscae-infected fly cadavers are detected by fly antennae and in combination are attractive to male flies. To determine if the pathogenic fungus synthesizes these compounds (novel chemical attraction) or they naturally occur in decaying fly cadavers, for example via post mortem house fly gene expression, cadaver gene expression was analysed. Our data showed that E. muscae actively expressed, and in late vs early E. muscae-infected cadavers had statistically significant differential expression of several genes in key chemical synthesis pathways (Fig. 6a). This included, acetyl-coA carboxylase (ACC1), the fatty acid synthases (FAS1, FAS2), and long-chain-fatty acid-CoA ligase 2 (ACSL) [67] (Supplementary table 3), generally known to catalyse the production of precursors for bioactive esters and fatty acids. Furthermore, E. muscae expressed all seven enzymes in the mevalonate pathway that synthesise isoprenoid precursors [68] and a farnesyl-diphosphate farnesyltransferase (FDFT), required for sesquiterpenoid and triterpenoid biosynthesis (Fig. 6b, Supplementary table 4). Finally, we identified three fungal transcripts, one of which was up-regulated in 25–30 h old cadavers compared to early cadavers. The three fungal transcripts showed significant homology to the yeast Saccharomyces cerevisiae ethyl ester biosynthesis genes eht1 and eeb1 (Supplementary table 5), which are specifically involved in ethyl octanoate biosynthesis [69, 70]. Post mortem expression of housefly (M. domestica) alkene biosynthesis genes was significantly lower in late E. muscae-infected cadavers compared to early E. muscae-infected cadavers (Fig. 6a, Supplementary table 6), showing that the E. muscae-infected cadavers are not actively continuing to produce cuticular hydrocarbons. The expression of fatty acid synthases, all seven genes in the mevalonate pathway, and ethyl ester biosynthesis genes suggests that E. muscae is likely responsible for the biosynthesis and release of the identified ethyl octanoate and sesquiterpene volatiles.

Fig. 6: Housefly and E. muscae gene expression during sporulation in fungus-infected cadavers.
figure 6

a Expressed E. muscae transcripts in late (25–30 h post death) vs. early (3–8 h post death) cadavers, and housefly expressed transcripts in infected early vs. uninfected early, and infected late vs. uninfected late (MA-plots). Blue dots show significantly higher or lower expressed genes (Log2 fold-change >1; p < 0.001). b All enzymes in the fungal mevalonate and sesquiterpene biosynthesis pathway were identified and expressed in E. muscae. Blue-coloured boxes denote enzyme-coding genes significantly higher expressed in late vs. early sporulation cadavers (Log2 fold-change > 1; p < 0.001). For each enzyme the Enzyme Commission (EC) number and expression in transcripts per million (tpm) in early/late sporulation is given.


Any obligate and host-specialized pathogen is in direct need of transmission to a new host. The insect-pathogenic fungus E. muscae represents a novel instance of volatile-mediated pathogen manipulation of host-mating behaviour [21, 22, 71]. Here we show that healthy males are attracted to and attempt mating with fungus-infected cadavers, which significantly increases the chance of fungal infection and transmission. Infection with E. muscae induces qualitative and quantitative changes in the volatile chemistry that attracts houseflies by both adding new compounds and altering the levels of cuticular fly hydrocarbons. The males thus respond both to an amplified and novel chemical attraction signal from fungus-infected cadavers. In particular, infected cadavers produce multiple new volatile compounds, including several sesquiterpenes not previously associated with houseflies. Sesquiterpenes have recently been found to be attractive in several other insects. For example the sesquiterpenes β-caryophyllene and β-elemene are attractive to Apis cerana [72], whereas β-trans-bergamotene is considered to attract bumble bees [73]. Terpenoids, including sesquiterpenes, are otherwise well known anti-feedants and antimicrobials [74]. For example, β-selinene is a known antifungal compound in the roots of maize, and also induced by jasmonic acid in celery [75, 76]. However, in general, sesquiterpenes are not sufficiently acknowledged as volatiles in the literature. This is most likely due to difficulties with structurally elucidating these compounds by GC–MS alone, because the mass spectra lack diagnostic peaks differentiating the many alternative structural backbones and isomers. In fact, alternative complementary approaches, such as in vivo labelling and detailed biosynthetic considerations [77] or NMR-studies, requiring pure samples of >1000-fold more compound than GC–MS, are often required for the full identification of unknown sesquiterpenes.

Whereas female houseflies normally avoid oviposition on animal faeces colonized by harmful fungi [78], the volatiles from E. muscae infected cadavers and conidia were attractive to the flies. It is plausible that the volatile compounds attract male flies from a distance, but when males come within closer proximity of the cadaver, they respond to the new and altered levels of cuticular compounds (Supplementary Fig. 17). For example, methyl-branched alkanes known to elicit male sexual and courtship behaviours increased in levels in fungus-infected cadavers compared to uninfected controls. Earlier studies have ruled out that an increase in the amount of the main housefly sex pheromone compound (Z)-9-tricosene or visual cues alone from the altered size and appearance of the cadaver were responsible for the male attraction to E. muscae infected cadavers [34, 38]. However, these earlier studies did not analyse cuticular hydrocarbons from late sporulation cadavers as in the present study, where a compound tentatively identified as the main housefly sex pheromone component (Z)-9-tricosene was detected in both male and female infected cadavers. (Z)-9-Tricosene was absent from all controls and early infected cadavers showing that only late sporulation E. muscae infected housefly cadavers contain this pheromone compound.

We observed a significant increase in mating attempts when the cadaver was in a late sporulation stage. Close physical contact in late stage of infection with more infectious conidia present increases the chance of fungal transmission. However, when a halo of conidia was present on the surface around the cadaver in late stage of infection there was no increase in mating attempts. In spider mites infected with another entomophthoralean fungus, Neozygites floridana, healthy spider mites avoid conidia-covered cadavers likely because of repelling tactile cues from the conidia [22]. In the E. muscae system, however, conidia were attractive to male houseflies and the negative effect on mating attempts in the presence of conidia suggests male houseflies investigate or feed off the surrounding conidia rather than being stimulated to mate. The initial volatile attraction is therefore not necessarily related to sexual behaviours and could instead be linked to feeding, in particular as we observed proboscis extension towards the conidia and as they were attractive to both males and females. A similar mechanism has recently been suggested for specific pollinator attraction to an Australian spider orchid, Caladenia drummondii, pollinated by solitary thynnine wasps [79]. Here long-range attraction of wasps could be facilitated by volatiles eliciting sexual behaviours although pollination occurs during nectar-foraging. In the fruit fly D. melanogaster, feeding and sexual behaviour is tightly linked [80, 81], and it is thus difficult to distinguish whether housefly males are lured in from a distance due to mating cues or feeding cues (i.e. sexual or food mimicry, respectively). However, once male houseflies respond to E. muscae cadaver volatiles and come into close proximity of late sporulation cadavers, it is tempting to speculate that the significant increase in mating attempts is due to the presence of a sex pheromone (Fig. 4), and female visual cues [34, 38].

The obligate fungal pathogen E. muscae studied here can induce epizootics in housefly populations [82], and previous findings indicate that horizontal transmission can occur via conidial exchange between healthy males exposed to conidia and healthy females [83]. An increase in male sexual behaviour towards sporulating cadavers may thus serve the dual purpose both to infect the focal male fly, but also as a viable option for wider fungal transmission throughout a population. On the one hand, houseflies have an emerging role in animal feed as house fly larvae [84], on the other hand, especially under unsanitary conditions houseflies also act as mechanical vectors for more than 100 disease-causing human pathogens [85]. This ambiguous role leads to situations where regulation of housefly populations may be necessary. The findings presented here may thus have the potential for discoveries of novel semiochemical housefly-specific attractants suitable for pest control.

The volatile organic compounds produced by E. muscae clearly serve a manipulative behavioural function to attract healthy susceptible hosts. The volatile attraction of new susceptible hosts has evolved numerous times across animal and microbial phyla, for example bacteria [19], nematodes [20], fungi [21, 22], beetle-tapeworms [23,24,25], and plant viruses [26]. The use of chemical compounds as attractants have likely evolved from compounds produced for other purposes [86]. Such precursors could be structural compounds, compounds with an integral function for the fungus’ survival, or compounds that protect the cadaver from biotic and environmental factors. The functional adoption of ancestral compounds as fungus-emitted volatiles in E. muscae thus represent the evolution of an extended phenotypic trait [27], which exploit the willingness of male flies to mate and benefits fungus transmission by altering the behaviour of uninfected males. Because E. muscae also turn infected hosts into so-called “zombie-flies”, this is one of the first descriptions of a behaviour-manipulating pathogen that extends beyond the manipulation and death of the focally infected host, to also manipulate the behaviour of healthy individuals.