  Let (G,K) be a symmetric pair over the complex numbers, and let X=K\G be the
corresponding symmetric space. In this paper we study a nearby cycles functor
associated to a degeneration of X to MN\G, which we call the "wonderful
degeneration". We show that on the category of character sheaves on X, this
functor is isomorphic to a composition of two averaging functors (a parallel
result, on the level of functions in the p-adic setting, was obtained in [BK,
SV]). As an application, we obtain a formula for the geometric Jacquet functor
of [ENV] and use this formula to give a geometric proof of the celebrated
Casselman's submodule theorem and establish a second adjointness theorem for
Harish-Chandra modules.
