  Light scattering in inhomogeneous media induces wavefront distortions which
pose an inherent limitation in many optical applications. Examples range from
microscopy and nanosurgery to astronomy. In recent years, ongoing efforts have
made the correction of spatial distortions possible by wavefront shaping
techniques. However, when ultrashort pulses are employed scattering induces
temporal distortions which hinder their use in nonlinear processes such as in
multiphoton microscopy and quantum control experiments. Here we show that
correction of both spatial and temporal distortions can be attained by
manipulating only the spatial degrees of freedom of the incident wavefront.
Moreover, by optimizing a nonlinear signal the refocused pulse can be shorter
than the input pulse. We demonstrate focusing of 100fs pulses through a 1mm
thick brain tissue, and 1000-fold enhancement of a localized two-photon
fluorescence signal. Our results open up new possibilities for optical
manipulation and nonlinear imaging in scattering media.
