There is a need for mathematical modelling for the evaluation of important parameters for photon imaging systems. A Monte Carlo program which simulates medical imaging nuclear detectors has been developed. Different materials can be chosen for the detector, a cover and a phantom. Cylindrical, spherical, rectangular and more complex phantom and source shapes can be simulated. Photoelectric, incoherent, coherent interactions and pair production are simulated. Different detector parameters, e.g. the energy pulse-height distribution and pulse pile-up due to finite decay time of the scintillation light emission, can be calculated. An energy resolution of the system is simulated by convolving the energy imparted with an energy-dependent Gaussian function. An image matrix of the centroid of the events in the detector can be simulated. Simulation of different collimators permits studies of spatial resolution and sensitivity. Comparisons of our results with experimental data and other published results have shown good agreement. The usefulness of the Monte Carlo code for the accurately simulation of important parameters in scintillation camera systems, stationary as well as SPECT (single-photon emission computed tomography) systems, has been demonstrated.