  We give a geometric interpretation of the Weil representation of the
metaplectic group, placing it in the framework of the geometric Langlands
program.
  For a smooth projective curve X we introduce an algebraic stack \tilde\Bun_G
of metaplectic bundles on X. It also has a local version \tilde\Gr_G, which is
a gerbe over the affine grassmanian of G.
  We define a categorical version of the (nonramified) Hecke algebra of the
metaplectic group. This is a category Sph(\tilde\Gr_G) of certain perverse
sheaves on \tilde\Gr_G, which act on \tilde\Bun_G by Hecke operators. A version
of the Satake equivalence is proved describing Sph(\tilde\Gr_G) as a tensor
category.
  Further, we construct a perverse sheaf on \tilde\Bun_G corresponding to the
Weil representation and show that it is a Hecke eigen-sheaf.
