Energetic electron depletions are a notable feature of the nightside Martian upper atmosphere. In this study, we investigate systematically the variations of the occurrence of depletions with both internal and external conditions, using the extensive Solar Wind Electron Analyzer measurements made on board the Mars Atmosphere and Volatile Evolution. In addition to the known trends of increasing occurrence with decreasing altitude and increasing magnetic field intensity, our analysis reveals that depletions are more easily observed in regions with near horizontal magnetic fields and under low solar wind (SW) dynamic pressures. We also find that below 160 km, the occurrence increases with increasing CO 2 density, a trend mostly visible in weakly magnetized regions. These observations have important implications on the formation of electron depletions: (1) Near strong magnetic anomalies, closed magnetic loops preferentially form and shield the atmosphere from direct access of SW electrons, a process that is modulated by the upstream SW condition; and (2) in weakly magnetized regions, SW electrons precipitate into the atmosphere unhindered, but at sufficiently low altitudes, they are either "absorbed" due to inelastic collisions with ambient neutrals or shielded again in response to a change in magnetic connectivity from open to closed. Our analysis further reveals that both the ionospheric plasma content and thermal electron temperature are reduced in regions with depletions compared to regions without, supporting SW electron precipitation as an important source of external energy driving the variability in the deep nightside Martian upper atmosphere and ionosphere. the Solar Wind Electron Analyzer (SWEA) on board the recent Mars Atmosphere and Volatile Evolution (MAVEN) spacecraft (Jakosky et al., 2015). Steckiewicz et al. (2017) performed a comprehensive analysis of nightside energetic electron precipitation near Mars combining the measurements made by the Mars Global Surveyor (MGS), the Mars Express (MEx), and MAVEN, identifying more than 134,500 depletions between 125 and 900 km in altitude. The fractional