Coherent anti-Stokes Raman scattering (CARS) spectroscopy is applied to investigate the fluid phase behavior in small mesopores at bulk sub- and supercritical temperatures. CARS spectra of the Q-branch (1388 cm−1) of carbon dioxide were measured at isothermal compression in pores of two nanoporous glass samples with pore radii of 2 and 3.5 nm. The spectral transformations with pressure of the fluid indicate the formation of a condensed phase in the volume of pores that clearly demonstrates the shift of the critical point. The spectrum of carbon dioxide condensed in the wider pores corresponds approximately to the critical density in bulk. In the narrower pores, the spectrum is noticeably shifted towards the lower wavenumbers that correspond to higher density of condensed fluid. Copyright © 2013 John Wiley & Sons, Ltd.