Evolution is unfolding all around us as species tussle to survive or find ways to coexist, but it's still a relatively rare privilege to stumble across examples of life in the wild adapting right before our eyes.

So you can imagine researchers' surprise when they realized a genus of fungi appears to be straddling the biological boundaries ecologists have long used to describe them.

Using genetic and chemical analyses, a Danish-led team of mycologists surveyed 10 plant species from five dispersed locations looking for traces of Mycena fungi, a genus commonly known as bonnet mushrooms consisting of around 500 species.

In the fungal kingdom, species usually occupy one of three ecological niches. Mycena fungi are decomposers, or saprotrophs, which live off dead and decaying organic matter, cycling nutrients through ecosystems.

Unlike saprotrophs, parasitic and mutualistic fungi take up residency in living plants, either feeding on plants or exchanging nutrients with their hosts, respectively.

"That's how we traditionally divided fungi into strictly separate ecological groups: mutualistic, parasitic, or saprophytic," explains Christoffer Bugge Harder, a microbiologist at University of Oslo who led the new study of Mycena fungi.

However, the strict division has been increasingly called into question, as ecologists have come to appreciate fungi won't be confined to these simplistic classifications.

Previous lab experiments suggested Mycena could invade the roots of living seedlings in plastic dishes, but whether or not they could do so in the wild – when other fungi and environmental factors are in play – remained unknown.

Harder and colleagues surveyed existing data and sampled more wild plant roots, finding genetic signatures of Mycena fungi in 9 of the 10 plant species studied, which included Arctic, alpine, and temperate plants.

"Using DNA studies, we found that Mycena fungi are consistently found in the roots of living plant hosts," explains Harder. "This suggests that bonnets are in the process of an evolutionary development, from uniquely being decomposers of non-living plant material to being invaders of living plants."

While the study is only small, the findings demonstrate the ecological versatility of fungi and suggest Mycena may be en route to developing mycorrhizal abilities: where the fungus colonizes the host plant's root tissues.

Mycorrhizal fungi can be either helpful or harmful, mutualistic or parasitic, but from their analyses of nitrogen levels in the plant roots and fungi, the researchers determined that some Mycena seem to be helping the plants they invade – just like the first mycorrhizal fungi which likely played a key role in enabling plants to get a foothold on land some 400 million years ago.

"We see that some Mycena appear to exchange nitrogen, an indispensable nutrient for plants, with carbon from plants," says Harder.

As to how Mycena came to evolve this newfound ability, the researchers suggest it might have something to do with human-cultivated plantations where row upon row of the same tree species is planted out.

Harder and colleagues noted a complete absence of Mycena in their samples of mature Pinus sylvestris trees, collected from a national park, whereas the roots of another conifer from a plantation forest were heavily infected with Mycena.

They suggest Mycena could invade the roots of young saplings in plantations more readily than in old-growth forests, where specialist fungi already thrive.

More research is needed to test the theory, although Harder says it's "reasonable to believe that we humans have played a role in this adaptation, because our monocultural plantations, stands of forest for example, have provided fungi with optimal conditions for adapting."

"The fungi seem to have seized upon this opportunity," he says.

The paper was published in Environmental Microbiology.