In 2018, during a survey in Souss region of Morocco, the dagger nematode Xiphinema pachtaicum was found parasitizing onion, (Allium cepa L.). The populations of dagger nematode were identified on the basis of their morphological and morphometric characters and by sequencing and analysing the D2D2 region of 28S rRNA. Microscopic observation of females demonstrated the occurrence of Xiphinema pachtaicum on onion. The 28S D2D3 sequences shared 99 to 100% similarity with sequence corresponding to X. pachtaicum in GenBank. To our knowledge this is the first report of Xiphinema pachtaichum infecting onion in Morocco.