You may be looking for the Millennium War.

The Doctor encountering Melanicus on Earth during the Millennium Wars. (COMIC: The Tides of Time)

Having temporary control of the Event Synthesizer and therefore over reality itself, the demon Melanicus instigated, for no other reason than to do it, the Millennium Wars, encompassing a thousand different worlds and a thousand different time periods.

The worlds ruined by the Wars included a future Earth. The wars ended after Sir Justin slew Melanicus and the Event Synthesizer was returned to the Prime Mover, who then ensured the Millennium Wars never existed. (COMIC: The Tides of Time)

The Fourth Doctor was briefly caught in one of these conflicts, not understanding its significance. (COMIC: The Deal)

Community content is available under CC-BY-SA unless otherwise noted.