Less crude protein (CP) in the diet can reduce nitrogen excretion of dairy cattle and lower their ammonia (NH3) and nitrous oxide (N2O) formation potential. The diet composition might also affect emissions of methane (CH4) and carbon dioxide (CO2). However, previous studies did not investigate the effect of diets with different CP levels that are customary practice in Switzerland on NH3 and greenhouse gas emissions on a practical scale. In a case-control approach, we quantified the emissions (NH3, N2O, CH4, CO2) in two separate but identical compartments of a naturally ventilated cubicle housing for lactating dairy cows over six days by using a tracer ratio method. Cows in one compartment received a diet with 116 g CP per kilogram dry matter (DM), in the other compartment with 166 g CP kg−1 DM. Subsequently, diets were switched for a second 6-day measurement phase. The results showed that the diet, aside from outside temperature and wind speed in the housing, was driving NH3 and N2O emissions. NH3 and N2O emission reduction per livestock unit (LU) was on average 46 % and almost 20 %, respectively, for the diet with low CP level compared to the higher CP level. In addition, strong relationships were observed between the CP content of the diet, N excretion in the urine and the milk urea content. An increased temperature or wind speed led to a clear increase in NH3 emissions. Differences in CH4 and CO2 emissions per LU indicated a significant influence of the diet, which cannot be attributed to the CP content. Our herd-level study demonstrated that a significant reduction in NH3 and N2O emissions related to LU, energy-corrected milk as well as DM intake can be achieved by lowering the CP content in the diet.