"We have 49 men, 26 women and 37 children who were seeking refuge in some Iraqi villages after they were left stranded on the border," said Mahmud Abd al-Aziz, the commander for the national guard in Munziriya, a town northeast of Baghdad.
The pilgrims had paid their guide 50,000 dinars ($35) to take them to the Shia city of Karbala, 110km south of the Iraqi capital.
Instead of reaching Iraq's holy sites, the group was arrested by Iraqi border guards during searches of outlying villages between 11 and 14 October, said Cpt Faisal Abd al-Karim, who helps to guard the Diyala border.
The pilgrims were initially detained at the border guard's base but were later moved to a lodging in a mosque in Munziriya.
He said 135 Afghans and Pakistanis were captured in the operation. A large weapons chache, including Kalashnikovs and rocket launchers, was also seized.
Abd al-Aziz, however, explained that the arms belonged to the villagers and not the pilgrims.