A maximum-likelihood (ML)-based magnetic-resonance-imaging (MRI) reconstruction algorithm is established, based on frequency- and phase-encoded data. The model on which the ML method is based is a superposition of exponentially decaying, sine-modulated sinusoids, arising from the basic Bloch equations for MR spectroscopy, modified to account for the distribution of resonance frequencies and phases used for spatial localization in the image field. Spatial-localizing gradients are assumed to be known linear functions of spatial coordinate position, with the x-encode (frequency) gradient applied continuously during the full duration of data collection, and the y-encode (phase) gradient applied during varying time periods before data collection. A single-voxel emitter becomes sinc-modulated in the x, y directions at rates proportional to voxel size and gradient strengths in the x-encode and y-encode directions. The full two-dimensional MRI signal becomes a superposition of sine-modulated, exponentially decaying, single-sinusoid emitters, one for each voxel. The ML estimation of spin-density and spin-spin relaxation decay time images becomes a nonlinear least-squares optimization problem; it is solved using an iterative expectation-maximization algorithm for estimating multiple modulated sinusoids in noise. Phantom studies are presented, demonstrating the accuracy of the model and the application of the algorithm to spin-density and spin-spin relaxation decay time profiles.