In the theory of viral eukaryogenesis I propose here, the eukaryotic nucleus evolved from a complex DNA virus. It is proposed that the virus established a persistent presence in the cytoplasm of a methanogenic mycoplasma and evolved into the eukaryotic nucleus by acquiring a set of essential genes from the host genome and eventually usurping its role. It is proposed that several characteristic features of the eukaryotic nucleus derive from its viral ancestry. These include mRNA capping, linear chromosomes, and separation of transcription from translation. In the model, phagocytosis and other membrane fusion-based processes are derived from viral membrane fusion processes and evolved in concert with the nucleus. The coevolution of phagocytosis and the nucleus rendered much of the host archaeal genome redundant since the protoeukaryote could obtain raw materials and energy by engulfing bacterial syntrophs/prey. This redundancy allowed loss of the archaeal chromosome, generating an organism with eukaryotic features. The evolution of phagocytosis allowed the eukaryotes to be the first organisms to occupy the niche of predator.