Using a multiphase transport model ͑AMPT͒, which includes both initial partonic and final hadronic interactions, we study the rapidity distributions of charged particles such as protons, antiprotons, pions, and kaons in heavy ion collisions at RHIC. The theoretical results for the total charged particle multiplicity at midrapidity are consistent with those measured by the PHOBOS Collaboration in central AuϩAu collisions at ͱsϭ56 and 130 A GeV. We find that these hadronic observables are much more sensitive to the hadronic interactions than to the partonic interactions. DOI: 10.1103/PhysRevC.64.011902 PACS number͑s͒: 25.75.Ϫq, 24.10.Lx Collisions of nuclei at high energies offer the possibility to subject nuclear matter to the extreme conditions of large compression and high excitation energies. Studies based on both nonequilibrium transport models ͓1͔ and equilibrium thermal models ͓2͔ have shown that the experimental data from heavy ion collisions at SIS, AGS, and SPS, where the center of mass collision energies are, respectively, about 3, 5, and 17 A GeV, are consistent with the formation of a hot dense nuclear matter in the initial stage of collisions. With the Relativistic Heavy Ion Collider ͑RHIC͒ at Brookhaven National Laboratory, which can reach a center-of-mass energy of 200A GeV, the initial energy density is expected to exceed that for the transition from the hadronic matter to the quark-gluon plasma. Experiments at RHIC thus provide the opportunity to recreate the matter which is believed to have existed during the first microsecond after the big bang and to study its properties.Recently, charged particle multiplicity near midrapidity has been measured in central AuϩAu collisions at ͱsϭ56and 130 A GeV at RHIC by the PHOBOS Collaboration ͓3͔. The observed charged particle density per participant is found to be compatible with the predictions of the HIJING model that includes particle production from minijets produced in hard-scattering processes ͓4͔. Although the HIJING model implements the parton energy loss via jet quenching ͓5͔, it does not include explicit interactions among minijet partons and the final-state interactions among hadrons. Other models have also been used to understand the data from the PHOBOS Collaboration. The LEXUS model ͓6͔, which is based on a linear extrapolation of ultrarelativistic nucleonnucleon scattering to nucleus-nucleus collisions, predicts too many charged particles compared with the PHOBOS data ͓7͔. On the other hand, the hadronic cascade model LUCIFER ͓8͔ predicts a charged particle multiplicity near midrapidity that is comparable to the PHOBOS data ͓9͔. In this Rapid Communication, we shall use a multiphase transport model ͑AMPT͒ ͓10͔, that includes both partonic and hadronic interactions, to study their effects not only on the total charged particle multiplicity but also on those of kaons, protons, and antiprotons. In the AMPT model, the initial conditions are obtained from the HIJING model ͓4͔ by using a Woods-Saxon radial shape for the colliding nuclei and in...