The terror group said Saturday's attack targeted Hindus and Sikhs after one of its members killed a temple guard "and opened fire on the pagans inside with his machine gun and hand grenades".
The accident occurred at an unmanned railway crossing close to the city of Sheikhupura in Pakistan's largest province, Punjab.
A six-year-old child was among the 25 victims of Wednesday's attack, claimed by a group affiliated with Daesh terror group.
A single gunman held worshippers hostage at the gurdwara in Kabul for several hours as Afghan special forces, helped by international troops, tried to clear the building. At least one of the dead is a child.
At least 700 pilgrims and more in the coming days are expected to pass through the border into Pakistan without a visa to pray at the shrine of the founder of their religion, Guru Nanak.
The two countries plan to give special permits to pilgrims to access the shrine of Guru Nanak through a corridor built on both sides of the border every day beginning next month.
Some 2,000 Sikhs travelled to Pakistan from neighbouring India despite recent tensions between the two nuclear-armed rivals.
Many Indian Sikhs believe that peace between India and Pakistan is possible because people from both the countries share common history and culture, and they get along very well.
The blast, hours after President Ashraf Ghani had opened a hospital in Jalalabad, damaged shops and buildings around Mukhaberat square in the city, killing 19 people
Subscribe to our Youtube channel for all latest in-depth, on the ground reporting from around the world.
Copyright © 2022 TRT World.