The structure of the N-terminal domain (NTD) of Rous sarcoma virus (RSV) capsid protein (CA), with an upstream 25 amino acid residue extension corresponding to the C-terminal portion of the Gag p10 protein, has been determined by X-ray crystallography. Purified Gag proteins of retroviruses can assemble in vitro into virus-like particles closely resembling in vivo-assembled immature virus particles, but without a membrane. When the 25 amino acid residues upstream of CA are deleted, Gag assembles into tubular particles. The same phenotype is observed in vivo. Thus, these residues act as a "shape determinant" promoting spherical assembly, when they are present, or tubular assembly, when they are absent. We show that, unlike the NTD on its own, the extended NTD protein has no beta-hairpin loop at the N terminus of CA and that the molecule forms a dimer in which the amino-terminal extension forms the interface between monomers. Since dimerization of Gag has been inferred to be a critical step in assembly of spherical, immature Gag particles, the dimer interface may represent a structural feature that is essential in retrovirus assembly.