This article describes a compact single-photon emission computed tomography (SPECT) system that consists of a high-resolution detector combined with a lofthole collimator. The detector is based on a NaI(Tl) scintillator, a position sensitive photomultiplier (PSPMT), dedicated read-out electronics that digitize all PSPMT anodes and finally, a maximum likelihood algorithm for position estimation. The collimator has a new pinhole geometry, called the lofthole. Our choice of magnification (1.06 for the mouse setup, 0.63 for the rat setup) results in a small system with a footprint of 45 cm x 25 cm. Design and measurements of both the detector and the SPECT system are shown. Detector measurements with a beam source have been done to investigate the spatial and energy resolution of the detector. Two SPECT setups have been made, one that fits rat-size phantoms and one that fits mouse-size phantoms. On both setups we have done measurements of a Derenzo phantom and a uniformity phantom. The results show that the detector resolution is 1.1 mm and energy resolution is 9.3% in the center of the detector. With the tomographic rat setup we are able to distinguish the 2.4 mm hot rods in a Derenzo phantom. The mouse setup allows us to distinguish the 1.6 mm rods. This demonstrates the SPECT capabilities of this compact prototype scanner.