In this report, we demonstrate how to obtain Raman spectra from single-beam CARS measurements under the condition of strong overlapping two-photon excited fluorescence (2PEF). Our approach is based on the use of a narrowband phase gate implemented via femtosecond laser pulse shaping from a single broadband laser source, without any use of polarization or amplitude modulation. The decisive quantity regarding the creation of 2PEF with shaped laser pulses is the second harmonic power spectrum, which shows a different dependence on the excitation phase from the CARS signal generation. By shifting the phase or the position of the gate in an appropriate way, it is possible to keep the second harmonic power spectrum and 2PEF constant, paving the way for an elimination of it. This allows to reconstruct the Raman signal and to retrieve quantitative information of resonances even when the fluorescence is about 160 times larger than the CARS signal. Copyright © 2013 John Wiley & Sons, Ltd.