Lt Col Mizanur of Bangladesh Rifles said BSF eventually handed Alam over at around 11.15pm.
Sumeru Mukharjee, one of two colleagues that had accompanied Alam on an assignment, told bdnews24.com that they were taking photographs near the border fence earlier in the day.
"As we inadvertently pointed our cameras toward the Indian side, a BSF patrol team called us over."
"Shahidul went to speak to the Indian border guards, while we stayed behind."
Bangladesh Rifles director general Maj Gen Md Mainul Islam had quickly confirmed that Alam was being held at the BSF's Sahapara camp.
He told DrikNEWS that BDR were doing all they could to get the world famous photographer released quickly.
Alam, founder of Drik Gallery and chief editor of international photo agency DrikNEWS, was working on a National Geographic assignment on the Brahmaputra river, said a spokesperson for the agency.
DrikNEWS editor Azizur Rahim Peu told bdnews24.com that Alam had been detained on the Indian side of the border from about 5pm.
His two colleagues, who remained on the Bangladeshi side in Kurigram district, were unable to contact him for some time.
Lt Col Mizanur, commanding officer of BDR's Six Rifles Battalion, based at Jamalpur, said he had specially asked his counterpart in India, Sunil Mehta, to release Alam that night.
"Usually, handovers do not take place at night, but Shahidul Alam is a well-known photographer and journalist, and my counterpart agreed to hand him over before the end of the night," the BDR officer said.
Locals told bdnews24.com that Alam and his two associates went to the Rowmari border with a local guide, where they were caught taking pictures of a barbed wire fence near the 1065th border pillar.
The group may have mistakenly strayed into no-man's land, they said. #