Possibilities of discriminating neutrons and gamma rays in the AGATA gamma-ray tracking spectrometer have been investigated with the aim of reducing the background due to inelastic scattering of neutrons in the high-purity germanium crystals. This background may become a serious problem especially in experiments with neutron-rich radioactive ion beams. Simulations using the GEANT4 toolkit and a tracking program based on the forward tracking algorithm were carried out by emitting neutrons and gamma rays from the center of AGATA. Three different methods were developed and tested in order to find "fingerprints" of the neutron interaction points in the detectors. In a simulation with simultaneous emission of six neutrons with energies in the range 1-5 MeV and 10 gamma rays with energies between 150 and 1450 keV, the peak-to-background ratio at a gamma-ray energy of 1.0 MeV was improved by a factor of 2.4 after neutron rejection with a reduction of the photopeak efficiency at 1.0 MeV of only a factor of 1.25. (C) 2009 Elsevier B.V. All rights reserved.