The DNA structure in phage capsids is determined by DNA-DNA interactions and bending energy. The effects of repulsive interactions on DNA interaxial distance were previously investigated, but not the effect of DNA bending on its structure in viral capsids. By varying packaged DNA length and through addition of spermine ions, we transform the interaction energy from net repulsive to net attractive. This allowed us to isolate the effect of bending on the resulting DNA structure. We used single particle cryo-electron microscopy reconstruction analysis to determine the interstrand spacing of double-stranded DNA encapsidated in phage λ capsids. The data reveal that stress and packing defects, both resulting from DNA bending in the capsid, are able to induce a long-range phase transition in the encapsidated DNA genome from a hexagonal to a cholesteric packing structure. This structural observation suggests significant changes in genome fluidity as a result of a phase transition affecting the rates of viral DNA ejection and packaging.