This work is the geometric part of our proof of the weighted fundamental lemma, which is an extension of Ngô Bao Châu’s proof of the Langlands–Shelstad fundamental lemma. Ngô’s approach is based on a study of the elliptic part of the Hichin fibration. The total space of this fibration is the algebraic stack of Hitchin bundles and its base space is the affine space of ‘characteristic polynomials’. Over the elliptic set, the Hitchin fibration is proper and the number of points of its fibers over a finite field can be expressed in terms of orbital integrals. In this paper, we study the Hitchin fibration over an open set larger than the elliptic set, namely the ‘generically regular semi-simple set’. The fibers are in general neither of finite type nor separated. By analogy with Arthur’s truncation, we introduce the substack of ξ-stable Hitchin bundles. We show that it is a Deligne–Mumford stack, smooth over the base field and proper over the base space of ‘characteristic polynomials’. Moreover, the number of points of the ξ-stable fibers over a finite field can be expressed as a sum of weighted orbital integrals, which appear in the Arthur–Selberg traceformula.