Earthworms are a farmer's best friend and in many ways his greatest hidden asset.

The ten common earthworm species found in agricultural soils can be allocated to one of three ecological groups - epigeic, endogeic and anecic.

Epigeic (litter-dwelling) are small (less than 8cm long), fast-moving worms that play a key role in carbon cycling.

Endogeic, (topsoil earthworms) are pale or green coloured and small to medium in length that often curl up when handled, and are the most common type found in arable fields.

Anecic (deep-burrowing) are large (longer than 8cm), dark red or black-headed that make vertical tunnels up to 2 metres deep.

It may not be obvious, but there can be up to seven million earthworms in a hectare of old pastureland. In fact, the weight of earthworms underneath fertile pastureland may be greater than that of the livestock grazing upon it.

Tunneling unseen, this mighty horde helps to maintain the health of soil. Through their activities they increase the drainage and aeration of soil when they open up channels for water and air down to the subsoil.

Soil biology is also improved, since the activity of earthworms stimulate micro-organisms and actively spreads fungi and bacteria through the soil profile. This ultimately affects soil chemistry, since the availability of practically all nutrients is improved when organic matter passes through the earthworm gut. For example, the concentration of nitrates is eight times higher in worm casts than in the surrounding soil.

It's hard to believe, but as much as 60 tonnes per hectare of soil passes through the digestive system of worms every year and is deposited on the surface as casts.

A worm's mouth is so small that no particles larger than about two millimetres can be taken in. So, over the years, worms build up a layer of fine soil on the surface of old, undisturbed pasture, covering up stones and eventually burying them.

Earthworms have always had to avoid "early birds" catching them unawares on the surface at dawn, but now they are coming under pressure from a range of other threats.

Worms can't survive in acid soils when the ph - a formula used to express the degree of acidity - is less than four, and as a result, dead vegetation soon accumulates on the surface forming a mat which forms peat in the right conditions.

Lack of profitability and the removal of lime subsidies has led to less lime being applied to upland pastures and an increase in their acidity, in many grazing areas to levels below 5 - that inhibits earthworms.

They are also sensitive to many components of modern agriculture such as pesticides, soil tillage and compaction by heavy tractors and equipment working on wet land. These are all things that are still commonplace in arable farming systems and account for arable land often having significantly lower worm populations than pastureland.

The sight of a horde of hungry gulls and rooks following a plough to devour worms and grubs as they are turned up in the furrow is common enough in arable areas.

Indeed, the effect of the plough on worm populations is the subject of frequent debate. One study found that ploughing carried 10 per cent of the total mass of earthworms in the soil up to the surface. Once there, birds ate around one-third, while two-thirds managed to escape and found their way back below the surface - so most survived the ordeal.

The real damage done to worm populations by the plough is the destruction of their tunnel systems, particularly in September and October when they reproduce.

The latest increasing threat to our earthworms is from the New Zealand flatworms, Artioposthia triangulata that were first sighted in N. Ireland in 1963 and then in Scotland in 1965. They are thought to have arrived in the British Isles either among daffodil bulbs or the roots of rose bushes. Over the last 50 years they have become well established as predators of our native earthworms.

N. Zealand flatworms do not burrow like our indigenous worms, although they do follow cracks and tunnel that they find in the soil. They are nocturnal and rest in damp places during the day, such as under stones. They feed at night, seemingly only locating worms by trial and error and then either paralysing or killing them with their mucus. That deadly mucus also protects them from predators by making them unpalatable..

Once again, we have imported a pest that damages our environment.