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 ∼ 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 4 × 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 ∼2−50 s and peak luminosities up to ∼ 4 × 10 38 erg s −1 (0.2−10 keV). Between the flares the luminosity was ∼ 2 × 10 35 erg s −1 . The flares were absent in the third observation, during which A0538−66 had a steady luminosity of 2 × 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 Γ 1 ≈ 2 − 4 and N H ≈ 10 21 cm −2 , plus a harder power-law component (Γ 2 ≈ 0 − 0.5) dominating above ∼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 our best 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.