Detailed well-log interpretations, including gamma-ray, density, neutron, and resistivity, alongside petrographic analysis of 100 samples over 170 m of drill cores, have revealed factors influencing reservoir heterogeneity in the Yamama Formation, Ah’Dimah Oilfield, southern Iraq. The formation comprises four reservoir units (YA-YD) separated by four non-reservoir units (BA-BD). The reservoir units are subdivided into subunits. YB2, YB3, and YC demonstrate the best reservoir quality, while YD2 is water-bearing. Seven microfacies were identified within both reservoir and non-reservoir units, deposited in a shallow carbonate ramp. These include bioclastic wackestone, Lithocodium-Bacinella float/boundstone, peloidal cortoid intraclast grainstone, reefal bioclastic rudstone, bioclastic foraminiferal wacke/packstone, miliolidal pack/grainstone, and spiculitic foraminiferal wackestone. Despite the deep burial depth of the formation (> 4000 m), it maintained good porosity values in most intervals, reaching up to 20%. Early isopachous cement protected porosity and dissolution enhanced porosity, while cementation, compaction, and pyritization reduced it. The reservoir units correlate with depositional environments, being deposited in the shoal area, while non-reservoir units were deposited in lagoon, middle, and outer-ramp settings. The Lithocodium-Bacinella float/boundstone and reefal bioclastic rudstone facies, forming reefal patches and build-ups within the shoal, dominated in YB2 and YC. Targeting these patches northeast of Ah’Dimah Oilfield is promising for field development.