  This is an improved version of the eprint previously entitled "Unexpected
isomorphisms between hyperk\"ahler fourfolds."
  We study smooth projective hyperk\"ahler fourfolds that are deformations of
Hilbert squares of K3 surfaces and are equipped with a polarization of fixed
degree and divisibility. They are parametrized by a quasi-projective
irreducible 20-dimensional moduli space and Verbitksy's Torelli theorem implies
that their period map is an open embedding.
  Our main result is that the complement of the image of the period map is a
finite union of explicit Heegner divisors that we describe. We also prove that
infinitely many Heegner divisors in a given period space have the property that
their general points correspond to fourfolds which are isomorphic to Hilbert
squares of a K3 surfaces, or to double EPW sextics.
  In two appendices, we determine the groups of biregular or birational
automorphisms of various projective hyperk\"ahler fourfolds with Picard number
1 or 2.
