Structure- and tectonic-related gas migration into Ordovician sandstone reservoirs and its impact on diagenesis history were reconstructed in two gas fields in the Sbaa Basin, in SW Algeria. This was accomplished by petrographical observations, fluid inclusion microthermometry and stable isotope geochemistry on quartz, dickite and carbonate cements and veins. Two successive phases of quartz cementation (CQ1 and CQ2) occurred in the reservoirs. Two phase aqueous inclusions show an increase in temperatures and salinities from the first CQ1 diagenetic phase toward CQ2 in both fields. Microthermometric data on gas inclusions in quartz veins reveal the presence of an average of 92 ± 5 mole% of CH4 considering a CH4-CO2 system, which is similar to the present-day gas composition in the reservoirs. The presence of primary methane inclusions in early quartz overgrowths and in quartz and calcite veins suggests that hydrocarbon migration into the reservoir occurred synchronically with early quartz cementation in the sandstones located near the contact with the Silurian gas source rock at 100–140°C during the Late Carboniferous period and the late Hercynian episode fracturing at temperatures between 117 and 185°C, which increased in the NW-direction of the basin. During the fracture filling, three main types of fluids were identified with different salinities and formation temperatures. A supplementary phase of higher fluid temperature (up to 226°C) recorded in late quartz, and calcite veins is related to a Jurassic thermal event. The occurrence of dickite cements close to the Silurian base near the main fault areas in both fields is mainly correlated with the sandstones where the early gas was charged. It implies that dickite precipitation is related to acidic influx. Late carbonate cements and veins (calcite – siderite – ankerite and strontianite) occurred at the same depths resulting from the same groundwater precipitation. The absence of methane inclusions in calcite cements result from methane flushing by saline waters.