We report the detection of strong absorption and weak emission features in the 4--27 micron Spitzer-IRS spectrum of the distant ultraluminous infrared galaxy (ULIRG) IRAS F00183--7111 (z=0.327). The absorption features of CO2 and CO gas, water ice, hydrocarbons and silicates are indicative of a strongly obscured (A[9.6]>=5.4; A[V]>=90) and complex line of sight through both hot diffuse ISM and shielded cold molecular clouds towards the nuclear power source. From the profile of the 4.67 micron CO fundamental vibration mode we deduce that the absorbing gas is dense (n~10^6 cm^-3) and warm (720 K) and has a CO column density of ~10^19.5 cm^-2, equivalent to N[H]~10^23.5 cm^-2. The high temperature and density, as well as the small infered size (<0.03pc), locates this absorbing gas close to the power source of this region. Weak emission features of molecular hydrogen, PAHs and Ne+, likely associated with star formation, are detected against the 9.7 micron silicate feature, indicating an origin away from the absorbing region. Based on the 11.2 micron PAH flux, we estimate the star formation component to be responsible for up to 30% of the IR luminosity of the system. While our mid-infrared spectrum shows no tell-tale signs of AGN activity, the similarities to the mid-infrared spectra of deeply obscured sources (e.g. NGC4418) and AGN hot dust (e.g. NGC1068), as well as evidence from other wavelength regions, suggest that the power source hiding behind the optically thick dust screen may well be a buried AGN.