Solar absorption spectroscopy in the near infrared has been performed in Ny-Ålesund (78.9° N, 11.9° E) since 2002; however, due to the high latitude of the site, the sun is below the horizon from October to March (polar night) and no solar absorption measurements are possible. Here we present a novel method of retrieving the total column dry-air mole fractions (DMFs) of CO2 and CH4 using moonlight in winter. Measurements have been taken during the polar nights from 2012 to 2016 and are validated with TCCON (Total Carbon Column Observing Network) measurements by solar and lunar absorption measurements on consecutive days and nights during spring and autumn. The complete seasonal cycle of the DMFs of CO2 and CH4 is presented and a precision of up to 0.5 % is achieved. A comparison of solar and lunar measurements on consecutive days during day and night in March 2013 yields non-significant biases of 0. 66 ± 4. 56 ppm for xCO2 and −1. 94 ± 20. 63 ppb for xCH4. Additionally a model comparison has been performed with data from various reanalysis models.