As sunset softens the vast Colorado sky into warm shades of pink and blue, the sound of chainsaws jars the stillness of this remote and rugged wilderness.

A forest service team works quickly, felling dozens of dead or dying lodgepole pines, the majestic trees that have towered over this region for generations. They are locked in a race against the mountain bark beetle, a tiny insect the size of a rice kernel, which is devouring unprecedented swathes of woodland across the US and Canadian north-west.

"It has reached a level where we cannot do anything to stop the bark beetle," said Clint Kyhl, a bark beetle incident commander for the US Forest Service. "So now our main focus is mitigating the impact of all these dead and dying trees."

The indigenous beetle dines on mature lodgepole pines, burrowing into their trunks and laying eggs.

In the current epidemic, the insects have already munched through an incredible 8.2 million hectares, a line stretching all the way from New Mexico to British Columbia, an area almost the size of entire UAE. And by the time their feast ends, it is expected they will have felled 90 per cent of the region's mature lodgepole pines, more than doubling the zone affected.

Scientists call it the worst bark beetle epidemic in recorded history, blaming a convergence of favourable conditions for the bug. Rising temperatures allowed their larvae to survive the winters, causing a population explosion.

Prolonged drought dehydrated the lodgepoles, weakening their ability to produce sap and "pitch out" the bugs. And because of mankind's success at mitigating wildfires over the past century, the forests were unusually mature.

"It came together to form the perfect storm," said Ingrid Aguayo, an entomologist at Colorado State University. "Everything is ripe now for the bark beetle."

It is stunning to see how the beetle epidemic is transforming the landscape. Dying or dead trees, their needles bright red, vastly outnumber younger, green lodgepoles across vast stretches of territory.

A chief concern is the potential for a massive forest fire, since the highly flammable dry needles could quickly turn into flying matchsticks. That is why forest rangers are busily chopping down trees - or at least thinning out their population - across the affected area.

"This has been our number one priority," said Mr Kyhl, of the Forest Service.

But dry needles should drop off within one season, greatly reducing any fire hazard. The second worry - one that will affect the region for as long as 15 years - is the risk of falling trees.

The lodgepole has shallow roots, meaning it falls over after it dies. And when millions of trees eventually come crashing down, they will smash into homes and other buildings, cut power lines and block roads, campgrounds and nature trails.

Forest rangers worry that falling trees could kill people. They closed 32 campgrounds in Colorado alone last summer to cut down trees at risk of toppling over.

Another fear, according to Mr Kyhl, is disruption to the national electrical supply if lodgepoles drop on major transmission lines connecting the western power grid.

"Falling tree hazard is what keeps us awake at night," said Mary Ann Chambers, a spokeswoman for the US Forest Service in Colorado.

There could be other problems, including erosion and increased sedimentation in the region's water supply, much of which comes from mountain sources.

In two decades, there be will yet another headache to contend with: lots of dead trees lying on the ground. "It will be hard to fight fire with huge trees lying all over the place," Ms Chambers said. "You can't get firefighters where they need to go."

In what may become the silver lining in a very large cloud, some local businesses are trying to salvage and recycle the fallen trees.

Greenway LLC, a building firm in Granby, Colorado, is using fallen lodgepole timber to make wood flooring and furniture. And Confluence Energy, in nearby Kremmling, is making wood pellets for use in heating stoves.

The good news is that the forest will eventually grow back, and some scientists speculate that occasional beetle epidemics - the last one was in the 1970s - may just be nature's way of rejuvenating an ageing forest.

"It is just like our population," Ms Aguayo said. "If we have only old people, it is not healthy for society."

As vast areas of open space are cleared, some larger wildlife, including elk and deer, could emerge with stronger populations, along with other tree species like the Aspen.

Ms Chambers highlighted another positive outcome: "There will also be new views in the areas we have opened up. It will look different, but the mountains are still there and so are many other beautiful things."