Jailer Mushfiqur Rahman said some political prisoners walked out of jail after the fall of the Sheikh Hasina led government recently.
The other prison inmates, who were convicted in different cases including robbery, staged demonstrations for not getting released from the jail on Thursday morning, reports UNB.
At one stage, they set fire on the beds and furniture and tried to flee the jail.
Later, the prison guards charged baton and fired bullets to quell the clash, leaving 22 inmates injured.
On information, a team of army rushed in and brought the situation under control.