Peeking out from behind the massive cloud of coal smoke that is climate change, the tiniest sliver of a silver lining has emerged. We may still have a chance to keep the worst of global warming at bay.

According to a new study published in the journal Nature Communications, Earth has a 64 percent chance of keeping warming under 1.5 degrees Celsius if all fossil fuel infrastructures immediately begin to transition into zero-carbon alternatives.

This means every power plant, car, plane, ship and factory would be replaced at the end of their life with emission-free fuel or technology. However, the massive global effort has a chance at success if the phase-out starts immediately. If it were to begin in 2030, the chance of avoiding environmental catastrophe drops to 33 percent.

“It seemed surprising at first that below 1.5 degrees Celsius could still be achieved with all the current infrastructure that is out there. It goes a little against conventional wisdom,” Chris Smith, a co-author on the study, told CNN.

“But it actually makes sense in context of the remaining ‘carbon budget’ — basically how much we can emit and still stay under this limit.”

Using computers models, the study set estimated lifespans for power plants (40 years), planes (26 years) and cars (15 years) to determine global temperature rise if a phase-out began at the end of 2018.

The model also assumed that beef and dairy consumption would experience a significant decline.

But the study didn’t take into account events that could suddenly spark runaway global warming, such as melting permafrost abruptly spewing huge volumes of methane into the atmosphere — a scenario that NASA notes is often left out of climate change projections.

It also didn’t consider political and economic barriers that would — and already have — made such a transition all the more difficult.

Researchers said they knew an immediate and total phase-out is a long shot, but stressed that it is possible.

“The climate system is not stopping you [hitting the target], global society is stopping you,” Smith told The Guardian.

He added that he personally believes Earth is headed for warming between 2 and 2.5 degrees Celsius.

Global temperatures have already warmed about 1 degree Celsius. If warming rises about 1.5 degrees Celsius, scientists predict an onslaught of devastating weather events including more extreme droughts and floods which would lead to animal die-offs, global food shortages and mass migrations.

In November, the United Nations issued a dire warning that, if nothing changes, global temperatures are on track to rise between 5.4- and 9.0-degree Fahrenheit this century.