Continental groundwaters are commonly enriched in nitrous oxide (N2O) and methane (CH4), which can discharge into the coast. The contribution of this diffuse source to coastal N2O and CH4 emissions largely depends on the biogeochemical processes of coastal aquifer exit zones, known as subterranean estuaries. Here, we study the role of subterranean estuaries in modulating N2O and CH4 exports toward the coast. The two studied subterranean estuaries are located at Panxón and Ladeira beaches (Ría de Vigo, NW Iberian Peninsula) and had opposite oxygenation at their interior. Groundwater‐borne N2O was detected in the oxygenated subterranean estuary of Panxón Beach, although denitrification attenuated N2O before porewater was discharged into the coast. An N2O hotspot was detected at about 50 cm depth in this subterranean estuary, characterized by the presence of nitrate under suboxic conditions. This N2O also seems to be consumed along the flow path before discharging into the coast. The anoxic subterranean estuary of Ladeira Beach completely removed groundwater‐borne N2O. Yet, nitrification within its suboxic upper saline plume produced and exported N2O toward the coast, hiding the role of this subterranean estuary as an N2O sink. The anoxic subterranean estuary exported CH4 toward the coast. This CH4 was not sourced by continental groundwater, hence it was produced in situ fuelled by the accumulation of organic matter within the beach. The suboxic upper saline plume in Ladeira Beach and the oxygenated subterranean estuary of Panxón Beach acted as CH4 sinks.