Patient motion and its deteriorating effects in medical imaging is well known. Likewise, head rigid-body motion degrades the image quality in brain SPECT. We developed an algorithm to compensate the head motion in multi-pinhole SPECT systems within a statistical iterative image reconstruction algorithm. Previously, volunteer's head motion was recorded by Vicon MX visual tracking system for 10 minutes while laying inside a SPECT/CT gantry. We then divided the motion into 120 intervals, each 5 seconds long. AdaptiSPECT-C, a multi-pinhole multi-detector stationary SPECT system, we are developing for dedicated brain imaging was used for this study. We generated an XCAT voxelized brain phantom emulating the activity distribution of Iodine-123 N-isopropyl-4-iodoamphetamine (IMP) for brain perfusion scan. To simulate the data acquisition with head motion, we used generic analytic simulation software we developed for multi-pinhole SPECT systems. The 6-degrees-offreedom (6-DOF) motion was incorporated into the simulation software to realistically simulate the data acquisition with motion. Our previously developed graphics-processing-unit (GPU)-based iterative reconstruction software was augmented to incorporate motion compensation using 3D Gaussian interpolation. The rigidbody (i.e. 6-DOF) head motion was input to the reconstruction software through 120 motion intervals. For comparison, we reconstructed the motion corrupted SPECT data without motion compensation and a motion-free acquisition as ground truth. The results show that our proposed motion compensation method provides a significantly better SPECT reconstruction when compared to no motion compensation. The developed software can be applied for any scan duration with any number of motion intervals.