Written simultaneously with the concluding episode, "The Time Is Now", the episode's script went through several different versions before a final plot was decided upon, as Morgan and Wong believed the series would not be renewed for a third season and wished to write a suitable ending. The idea of depicting an apocalyptic scenario as being the result of a virus came from Morgan's research into possible end-of-the-world scenarios, and was influenced by the outbreak of bovine spongiform encephalopathy in the United Kingdom. The build-up to, and depiction of, the viral outbreak was seen by the writing staff as conclusive proof that the series would be cancelled, leading to several writers beginning to look for work on other projects while still officially under contract to work on "Millennium".