  We propose a geometric interpretation of the theory of elliptic endoscopy,
due to Langlands and Kottwitz, in terms of the Hitchin fibration. As
applications, we prove a global analog of a purity conjecture, due to Goresky,
Kottwitz and MacPherson. For unitary groups, this global purity statement has
been used, in a joint work with G. Laumon, to prove the fundamental lemma over
local fields of equal characteristics.
