All viruses require strategies to inhibit or evade the immunity pathways of cells they infect. The viruses that infect bacteria, bacteriophages (phages), must avoid nucleic-acid targeting immune pathways such as CRISPR-Cas (clustered regularly interspaced short palindromic repeats and CRISPR-associated genes) and restriction-modification (R-M) systems to replicate efficiently 1 . Here, we show that jumbo phage ΦKZ, infecting Pseudomonas aeruginosa, segregates its DNA from immunity nucleases by constructing a proteinaceous nucleus-like compartment. ΦKZ resists many DNA-targeting immune systems in vivo, including two CRISPR-Cas3 subtypes, Cas9, Cas12a, and the restriction enzymes HsdRMS and EcoRI. Cas and restriction enzymes are unable to access the phage DNA throughout the infection, but engineered re-localization of EcoRI inside the compartment enables phage targeting and cell protection. Moreover, ΦKZ is sensitive to the RNA targeting CRISPR-Cas enzyme, Cas13a, likely due to phage mRNA localizing to the cytoplasm. Collectively, we propose that Pseudomonas jumbo phages evade a broad spectrum of DNA-targeting nucleases through the assembly of a protein barrier around their genome.