Endoscopy for GSp(4) and the Cohomology of Siegel Modular Threefolds The geometry of modular curves and the structure of their cohomology groups have been a rich source for various number theoretical applications over the last decades. Similar applications may be expected from the arithmetic of higher dimensional modular varieties. For Siegel modular threefolds some basic results on their cohomology groups are derived in this book from considering topological trace formulas An Application of the Hard Lefschetz Theorem CAP Localization The Ramanujan Conjecture for Genus two Siegel modular Forms Character identities and Galois representations related to the group GSp(4) Local and Global Endoscopy for GSp(4) A special Case of the Fundamental Lemma I A special Case of the Fundamental Lemma II The Langlands Shelstad transfer factor Fundamental lemma (twisted case) Reduction to unit elements Appendix on Galois cohomology Appendix on Double Cosets