Alternate timeline (The Pyramid at the End of the World)

In an alternate timeline predicted by the Monks, the Earth was ravaged by a mutated strain of the Raoultella planticola bacteria.

A series of unfortunate events
In 2017, two scientists at Agrofuel Research Operations were experimenting on genetically modifying raoultella planticola bacteria to break down the root system of a plant. However, Erica's glasses were inadvertently broken by her husband, forcing her to rely on Douglas instead to program how much of EC 31 enzyme they would spray. However, as Douglas had been drinking his vision was blurred and he misplaced a decimal point and instead of making it 11.89, it became 118.9. As a result, the bacteria became far stronger than intended, strong enough to break down plants and humans exposed to it, turning them into gunk.

Shortly after the new bacteria was created, it killed Douglas, its inadvertent creator. Much of the research staff fled aside from Erica who attempted to stop the bacteria from escaping when the lab's ventilation system automatically cycled to remove toxins in the air. However, Erica was unable to prevent the release of the bacteria upon the Earth. (TV: The Pyramid at the End of the World)

Destruction of all life on Earth
Loose upon the Earth, the bacteria spread, breaking down all living things and wiping out all life on the planet. Within a year, the Earth was "as dead as the Moon" with a few dead trees amongst the devastation appearing to be the only things that did not appear to have been broken down completely. (TV: The Pyramid at the End of the World)

Intervention by the Monks
Having studied humanity through the Shadow World, the Monks detected the impending catastrophe and saw the chance to get the consent they required to finally invade the Earth. Landing The Cathedral in a potential warzone in Turmezistan, the Monks drew the attention of the world leaders, including the Twelfth Doctor as the President of Earth. Having learned of the Monks from a recording sent by his Shadow World counterpart, the Doctor recognized the danger from the Monks who reset every clock on Earth to three minutes to midnight in an imitation of the Doomsday Clock, showcasing how long humanity had until the events they predicted came to pass.

After Douglas misplaced the decimal point and started the creation of the Raoultella planticola bacteria that would end the world, the clock moved to two minutes to midnight and after the world leaders' failed show of strength, the Monks invited them to see what the Monks had predicted if they refused to ask the Monks for help and in effect, turn the world over to them. The Doctor, his companions Bill Potts and Nardole were shown one year in the future where the Earth was as "dead as the Moon." The Monks demanded consent for their dominion in exchange for their help in preventing this timeline, but refused to accept any consent that wasn't given out of love. As the clock moved to one minute to midnight, the UN Secretary General attempted to consent out of fear, but was killed as a result. The Doctor refused to consent to the Monks and pointed out that in the past, he had saved the Earth from certain doom.

As Erica and Douglas discovered the deadly effects of the new bacteria on the plants in their lab and attempted to determine the source of the problem, the Doctor and the other world leaders attempted to solve the problem with the leaders making peace with each other in an effort to avoid World War III which they suspected was the issue. When making peace changed nothing, the Doctor realized that the Monks had chosen a potential warzone to land in as a misdirection and that something else was the true problem. Nardole suggested bacteria as an alternative for what could end all life on the planet which the Doctor believed was the most likely explanation. The Doctor realized that it couldn't be a disease such as the plague as some people would be immune and all life on Earth had been wiped out in the future. As a result, whatever would go down would be a mistake of some sort.

The Doctor downloaded all of the top secret files in the world onto the Internet in searchable format and set his companions and the world leaders to searching for a possible candidate as Douglas fell victim to the bacteria and Erica uncovered the truth and evacuated the lab. With time running out and no success, the remaining leaders decided to surrender to the Monks in an attempt to save the world and Bill accompanied them on the Doctor's request. At the same time the Doctor, realized that the Monks had to be monitoring whichever lab would be responsible via the CCTV cameras. By having Nardole shut off the cameras to the 428 labs on the UNIT watchlist they had narrowed it down to, he was able to track the problem to Agrofuel Research Operations when the Monks switched the cameras back on only at Agrofuel. (TV: The Pyramid at the End of the World)

Sterilization of the bacteria
The Doctor and Nardole traveled in the Doctor's TARDIS to Agrofuel where the Doctor sent Nardole to move the TARDIS as Nardole was "human enough" to be contaminated by the bacteria. However, Nardole fell victim to the bacteria and collapsed after moving the TARDIS to another part of the lab. Having gotten the story from Erica, the Doctor contacted Bill and the others and informed them of his discovery. However, while the bacteria had not yet been released into the atmosphere, Erica warned that the lab had an air filtration system that ran every thirty minutes to pump toxins out of the air. When it activated, it would send the bacteria into the atmosphere and cause the future the Monks predicted. Erica couldn't shut the system off and the next cycle would occur in twenty minutes.

As the world leaders decided to enter the pyramid and make a deal with the Monks as the clock changed to twenty seconds to midnight, the Doctor realized that the only way to stop the bacteria was to sterilize it by blowing up half the lab. As the bacteria was filling the air in the lab and greenhouse with ethanol, the Doctor was able to construct an ignition device from items in the lab with Erica's help. However, as the leaders' consent was strategic, the Monks killed them though they told Bill that she could consent on the Doctor's behalf.

The Doctor ordered Erica into the machine room and ordered Bill to get out of the pyramid as they would no longer need the Monks' help. With just four minutes left, the Doctor set up the ignition device in the greenhouse with a two minute timer, causing the Doomsday Clock countdown to reverse as the bacteria was about to be destroyed before it could cause the world-ending catastrophe. However, the Doctor became trapped in the lab as he was blind and couldn't see the combination lock to open the airlock, Nardole was unconscious and unable to help him and the sonic screwdriver could only calculate the combination he needed, not enter it. Unwilling to let the Doctor die, Bill consented to the Monks in exchange for them restoring the Doctor's sight. The Doctor escaped with seconds to spare before the fire consumed the lab and destroyed the bacteria before it could be released, averting the destruction of the world. (TV: The Pyramid at the End of the World)

A terrible consequence
Though the Doctor succeeded in preventing this timeline, Bill's consent to the Monks enabled them to invade the Earth and take over for six months. However, the Doctor, Bill and Nardole, who survived the bacteria due to his alien physiology, managed to stop the invasion and force the Monks off the Earth. (TV: The Lie of the Land)