The human immunodeficiency virus type 1 (HIV-1) nucleocapsid protein (NC) is an essential protein for retroviral replication. Among its numerous functions, NC is a nucleic acid (NA) chaperone protein that catalyzes NA rearrangements leading to the formation of thermodynamically more stable conformations. In vitro, NC chaperone activity is typically assayed under conditions of low or no Mg(2+), even though reverse transcription requires the presence of divalent cations. Here, the chaperone activity of HIV-1 NC was studied as a function of varying Na(+) and Mg(2+) concentrations by investigating the annealing of complementary DNA and RNA hairpins derived from the trans-activation response domain of the HIV genome. This reaction mimics the annealing step of the minus-strand transfer process in reverse transcription. Gel-shift annealing and sedimentation assays were used to monitor the annealing kinetics and aggregation activity of NC, respectively. In the absence of protein, a limited ability of Na(+) and Mg(2+) cations to facilitate hairpin annealing was observed, whereas NC stimulated the annealing 10(3)- to 10(5)-fold. The major effect of either NC or the cations is on the rate of bimolecular association of the hairpins. This effect is especially strong under conditions wherein NC induces NA aggregation. Titration with NC and NC/Mg(2+) competition studies showed that the annealing kinetics depends only on the level of NA saturation with NC. NC competes with Mg(2+) or Na(+) for sequence-nonspecific NA binding similar to a simple trivalent cation. Upon saturation, NC induces attraction between NA molecules corresponding to approximately 0.3 kcal/mol/nucleotide, in agreement with an electrostatic mechanism of NC-induced NA aggregation. These data provide insights into the variable effects of NC's chaperone activity observed during in vitro studies of divalent metal-dependent reverse transcription reactions and suggest the feasibility of NC-facilitated proviral DNA synthesis within the mature capsid core.