The matter has been settled through negotiation between the two countries and the intervention of West Bengal Chief Minister Mamata Banerjee.
The fishermen were detained there for some time after they strayed into Bangladesh territory due to cyclonic weather.
The matter was heard by a local court there, Hakim said, adding that they were ultimately released.
"They are now ready for return to their homeland," he added.