We analyse deep images from the VISTA survey of the Magellanic Clouds in the YJKs filters, covering 14 sqrdeg (10 tiles), split into 120 subregions, and comprising the main body and Wing of the Small Magellanic Cloud (SMC). We apply a colour--magnitude diagram reconstruction method that returns their best-fitting star formation rate SFR(t), age-metallicity relation (AMR), distance and mean reddening, together with 68% confidence intervals. The distance data can be approximated by a plane tilted in the East-West direction with a mean inclination of 39 deg, although deviations of up to 3 kpc suggest a distorted and warped disk. After assigning to every observed star a probability of belonging to a given age-metallicity interval, we build high-resolution population maps. These dramatically reveal the flocculent nature of the young star-forming regions and the nearly smooth features traced by older stellar generations. They document the formation of the SMC Wing at ages <0.2 Gyr and the peak of star formation in the SMC Bar at 40 Myr. We clearly detect periods of enhanced star formation at 1.5 Gyr and 5 Gyr. The former is possibly related to a new feature found in the AMR, which suggests ingestion of metal-poor gas at ages slightly larger than 1 Gyr. The latter constitutes a major period of stellar mass formation. We confirm that the SFR(t) was moderately low at even older ages.