Helicobacter pylori (H. pylori) infection induces inflammation of the gastric mucosa, which may progress to precancerous lesions leading to gastric cancer. Pathological determinism is associated to some virulence genes of the bacterium, notably the vacA and cagA genes. The present study aimed to determine the H. pylori genotypes distribution and their association with sex, age and gastric diseases in a Moroccan population. Gastric biopsy was taken from 1079 consenting patients. The specimens were processed by PCR to identify H. pylori and to determine the genotypic profile by PCR characterizing vacA s, vacA m and vacA i regions directly from biopsies H. pylori positives. VacA genotyping revealed the predominance of vacA m2 (53.2%), vacA s2 (52.9%) and vacA i2 (52%). The most virulent vacA alleles (s1, i1 and m1) are more predominant in men (47.3%, 41.9% and 46.1% respectively) than in women (38.3%, 33.3% and 37% respectively). However, the association between vacA genotypes and age did not reach a statistical significant value. Logistic regression analysis results show that vacA i1m1 and vacA i1m2 genotypes were strongly associated with the risk of GC, the Odds Ratio (95% confidence interval) was 29.73 [5.08–173.73] and 9.17 [2.06–40.82] respectively, while vacAs1/cagA+ seems to be a risk factor for DU since it is inversely associated with GC (OR was 0.13 [0.02–0.75]. The results of this study suggest that vacA i1 genotype independently to vacAm status may be of a clinical usefulness and will help to identify patients at a high risk of GC development.