Abstract. Biological soil crusts (biocrusts) are selforganised thin assemblies of microbes, lichens, and mosses that are ubiquitous in arid regions and serve as important ecological and biogeochemical hotspots. Biocrust ecological function is intricately shaped by strong gradients of water, light, oxygen, and dynamics in the abundance and spatial organisation of the microbial community within a few millimetres of the soil surface. We report a mechanistic model that links the biophysical and chemical processes that shape the functioning of biocrust representative microbial communities that interact trophically and respond dynamically to cycles of hydration, light, and temperature. The model captures key features of carbon and nitrogen cycling within biocrusts, such as microbial activity and distribution (during early stages of biocrust establishment) under diurnal cycles and the associated dynamics of biogeochemical fluxes at different hydration conditions. The study offers new insights into the highly dynamic and localised processes performed by microbial communities within thin desert biocrusts.