Background: Duplex DNA is more than a simple information carrier. The sequence-dependent structure and its inherent deformability, in concert with the subtle modulating effects of the environment, play a crucial role in the regulation and packaging of DNA. Recent advances in force field and simulation methodologies allow molecular dynamics simulations to now represent the specific effects of the environment. An understanding of the environmental dependence of DNA structure gives insight into how histones are able to package DNA, how various proteins are able to bind and modulate nucleic acid structure and will ultimately aid the design of molecules to package DNA for more effective gene therapy. Results: Molecular dynamics simulations of d[ACCCGCGGGT](2) in solution in the presence of hexaamminecobalt(III) [Co(NH3)(6)(3+)] show stabilization of A-DNA and spontaneous B-DNA to A-DNA transitions, which is consistent with experimental results from NMR and Raman spectroscopic and X-ray crystallographic studies. In the absence of Co(NH3)(6)(3+), A-DNA to B-DNA transitions are observed instead. In addition to their interaction with the guanines in the major groove, Co(NH3)(6)(3+) ions bridge opposing strands in the bend across the major groove, probably stabilizing A-DNA. Conclusions: The simulation methods and force fields have advanced to a sufficient level that some representation of the environment can be seen in nanosecond length molecular dynamics simulations. These simulations suggest that, in addition to the general explanation of A-DNA stabilization by dehydration, hydration and ion association in the major groove stabilize A-DNA.