We present MOPEX - a software package for mosaicking of astronomical images.MOPEX features image registration, background matching, usage of several interpolation techniques, coaddition schemes, and robust and flexible outlier detection based on spatial and temporal filtering. Image registration is based on matching the positions and fluxes of common point sources in image overlap regions. This information is used to compute a set of image offset corrections by globally minimizing the cumulative point source positional difference. A similar approach was used for background matching in overlapping. The cumulative pixel-by-pixel difference between the overlapping areas of all pairs of images is minimized with respect to the unknown constant offsets of the input images. The interpolation techniques used by MOPEX are the area overlap, drizzle, grid, and bicubic interpolation. We compare different interpolation techniques for their fidelity and speed. Robust outlier detection techniques allow for effective and reliable removal of the cosmic ray hits contaminating the detector array images. Efficient use of computer memory allows mosaicking of data sets of very deep coverage of thousands of images per pointing, as well as areas of sky covering many square degrees. MOPEX has been developed for the Spitzer Space Telescope.