Cross-linking in proteins by α,β-dicarbonyl compoundsis one of the most damaging consequences of reactive carbonyl speciesin vivo and in foodstuffs. In this article we investigate computationallythe cross-linking of glyoxal and methylglyoxal with lysine and arginineresidues using density functional theory and the wB97XD dispersioncorrectedfunctional. Five pathways, AE, have been characterized. Inpathways A and B, the reaction proceeds via formation of the Schiffbase, aldimine, followed by addition of arginine. In contrast, in pathwaysCE, direct addition of arginine to the dicarbonyl compoundsoccurs first, leading to a dihydroxyimidazolidine intermediate, whichthen reacts with lysine after dehydration and proton transfer reactions.The results reveal that pathways A, C, and E are competitive whereasreactions via pathways B and D are much less favorable. Inclusion of upto five explicit water molecules in the proton transfer and dehydration steps is found to lower the energy barriers in the feasiblepathways by about 520 kcal/mol. Comparison of the mechanisms of methylglyoxal-derived imidazolium cross-linking (MODIC)and glyoxal-derived imidazolium cross-linking (GODIC) shows that the activation barriers are lower for GODIC than MODIC, inagreement with experimental observations.