DrikNEWS editor Azizur Rahim Peu said the Kurigram judicial magistrate's court granted him bail after he was taken there at around 12:45pm in the case filed with Rowmari Police Station in Kurigram.
He was detained for six hours by Indian Border Security Force on the northern Rowmari-Sahapara border on Tuesday night.
Lt Col Mizanur of Bangladesh Rifles said BSF handed Alam back at around 11.15pm.
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 Peu.
Sumeru Mukharjee, one of two colleagues that had accompanied Alam on the assignment, told bdnews24.com that they were taking photographs near the border fence on Tuesday.
"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 famous photographer released the same night.
He told bdnews24.com that Alam had been detained on the Indian side of the border from about 5pm until his release just after 11pm.
His two colleagues, who remained on the Bangladeshi side in Kurigram district, were unable to contact him for some time.
Local residents and BDR personnel 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.
They said the group may have mistakenly strayed into no-man's land.
First published in BdNews24.com, June 17, 2009