A gamma-ray tracking algorithm has been implemented and tested, using simulated data, for gamma rays with energies between 0.1 and 2 MeV, and its performance evaluated for a 90-mm-long, 60-mm-diameter, cylindrical, 36 (6 6) segment detector. The performance of the algorithm in two areas was determined: Compton suppression and Doppler shift correction. It was found that for gamma rays of energies around 1 MeV, a ratio of photopeak counts to total counts of 2 : 3 could be obtained using the tracking algorithm, with only a 2% reduction in detection efficiency, compared to the untracked data. Approximately 80% of first interaction points could be correctly identified, enabling a good Doppler shift correction. A detector of the type simulated has recently been delivered, together with a compactPCI digital data acquisition system comprising 36 12-bit, 40-MHz flash ADCs, and 6 200-MHz DSPs. Some initial data has been recorded using this system, and the performance of the tracking algorithm on this real data is comparable to its performance on simulated data.