A0538-66 is a Be/X-ray binary (Be/XRB) hosting a 69 ms pulsar It emitted bright X-ray outbursts with peak luminosity up to similar to 10(39) erg s(-1) during the first years after its discovery in 1977. Since then, it was always seen in quiescence or during outbursts with L-x less than or similar to 4 x 10(37) erg s(-1). In 2018 we carried out XMM-Newton observations of A0538-66. during three consecutive orbits when the pulsar was close to periastron. In the first two observations we discovered a remarkable variability, with flares of typical durations between similar to 2 and 50 s and peak luminosities up to similar to 4 x 10(38) erg s(-1) (0.2-10 keV). Between the flares the luminosity was similar to 2 x 10(35) erg s(-1). The flares were absent in the third observation, during which A0538-66 had a steady luminosity of 2 x 10(34) erg s(-1). In all observations, the X-ray spectra consist of a softer component, well described by an absorbed power law with photon index Gamma(1) approximate to 2-4 and N-H approximate to 10(21) cm(-2), plus a harder power-law component (Gamma(2) approximate to 0-0.5) dominating above similar to 2 keV. The softer component shows larger flux variations than the harder one, and a moderate hardening correlated with the luminosity. The fast flaring activity seen in these observations was never observed before in A0538-66, nor, to the best of our knowledge, in other Be/XRBs. We explore the possibility that during our observations the source was accreting in a regime of nearly spherically symmetric inflow. In this case, an atmosphere can form around the neutron star magnetosphere and the observed variability can be explained by transitions between the accretion and supersonic propeller regimes.