Various studies have reported that photochemical nucleation of new ultrafine particles (UFP) in urban environments within high insolation regions occurs simultaneously with high ozone (O<sub>3</sub>). In this work, we evaluate the atmospheric dynamics leading to summer O<sub>3</sub> episodes in the Madrid Air Basin (Central Iberia) by means of measuring a 3D distribution of concentrations for both pollutants. To this end, we obtained vertical profiles (up to 1200 m, above ground level) using tethered balloons and miniaturised instrumentation at a suburban site located to the SW of the Madrid Metropolitan Area (MMA), Majadahonda site (MJDH) in July 2016. Simultaneously, measurements of an extensive number of air quality and meteorological parameters were carried out at 3 supersites across the MMA. Furthermore, data from O<sub>3</sub>-soundings and daily radio-sounding were also used to interpret the atmospheric dynamics. <br><br> The results demonstrate the concatenation of venting and accumulation episodes, with relative O<sub>3</sub> lows (venting) and peaks (accumulation) in surface levels. Regardless of the episode type, fumigation of high altitude O<sub>3</sub>-rich layers contributes the major proportion of surface O<sub>3</sub> concentrations. Accumulation episodes are characterised by a relatively thinner planetary boundary layer (PBL < 1500 m at midday, lower in altitude than the orographic features), low synoptic winds and the development of mountain breezes along the slope of the Guadarrama Mountain Range (W and NW of MMA, maximum altitude > 2400 m). This orographic-meteorological setting causes the vertical recirculation of air masses and the enrichment of O<sub>3</sub> in the lower tropospheric layers. When the highly polluted urban plume from Madrid is affected by these dynamics, the highest O<sub>x</sub> (O<sub>3</sub> + NO<sub>2</sub>) concentrations are recorded in the MMA. <br><br> Vertical O<sub>3</sub> profiles during venting episodes, with marked synoptic winds and a deepening of the PBL reaching > 2000 m above sea level, were characterised by an upward gradient in O<sub>3</sub> levels, whereas low-altitude O<sub>3</sub> concentration maxima due to local/regional production were found during the accumulation episodes. The two contributions to O<sub>3</sub> surface levels (fumigation from high altitude strata and local/regional production) require very different approaches for policy actions. In contrast to O<sub>3</sub> vertical top-down transfer, UFP are formed in the lowest levels and are transferred upwards progressively with the growth of the PBL.