Background: Gastritis, an inflammatory disorder affecting the lining of the stomach, is a prevalent health concern across the globe, particularly in developing regions like Somalia. This study aims to investigate the primary risk factors linked to gastritis among adults receiving care at Capital Hospital in Mogadishu. Methods: An unmatched case-control study was executed from June 1 to July 30, 2024, involving 63 adult participants, with 21 patients diagnosed with gastritis through endoscopic procedures and 42 controls. A semi- structured questionnaire was employed to gather data on socio-demographic characteristics, dietary patterns, lifestyle habits, medical histories, and medication usage. Statistical analysis was performed using SPSS version 26. Results: The investigation revealed a gastritis prevalence of 78.8%, with acute cases constituting 48.9% and chronic cases 29.9%. Female participants were identified as having a protective effect against gastritis (Adjusted Odds Ratio [AOR]=0.05, p=0.023), whereas the routine use of non-steroidal anti-inflammatory drugs (NSAIDs) significantly raised the risk (Crude Odds Ratio [COR]=5.03, p=0.041). Interestingly, the presence of Helicobacter pylori was associated with a reduced risk of developing gastritis (COR=0.11, p=0.032). Other lifestyle and dietary factors did not show significant correlations. Conclusions: The results underscore the protective influence of gender and the associated risks of NSAID intake regarding gastritis among Somali adults. The unexpected finding of H. pylori infection linked to lower gastritis risk deserves further exploration. There is an urgent need for targeted public health strategies to address the effects of gastritis in Somalia.