We introduce an Uhlenbeck closure of the space of based maps from projective line to the Kashiwara flag scheme of an untwisted affine Lie algebra. For the algebra sl n this space of based maps is isomorphic to the moduli space of locally free parabolic sheaves on P 1 × P 1 trivialized at infinity. The Uhlenbeck closure admits a resolution of singularities: the moduli space of torsion free parabolic sheaves on P 1 × P 1 trivialized at infinity. We compute the Intersection Cohomology sheaf of the Uhlenbeck space using this resolution of singularities. The moduli spaces of parabolic sheaves of various degrees are connected by certain Hecke correspondences. We prove that these correspondences define an action of sl n in the cohomology of the above moduli spaces. §1. Introduction 1.1. For a symmetrizable Cartan matrix A, and the corresponding Kac-Moody algebra g(A), M. Kashiwara has introduced a remarkable flag scheme B(A) [13]. It shares many properties of the usual flag varieties of semisimple Lie algebras. For one thing, if C is a smooth projective curve of genus 0, and c ∈ C a