Identity of the deceased could not be known immediately.
Officer-in-charge of Bagmara police station Selim Hossain said a team of police informed of the presence of a gang of criminals conducted a drive in the area at about 300am.
Sensing the presence of the law enforcers, the gang members opened fire on them, forcing police to fire back that triggered a gun battle.
One of the gang members was caught in the line of fire and died on the spot while his associates managed to flee the scene, said the OC.
Police recovered the body and sent it to Rajshahi Medical College Hospital morgue for an autopsy.
The law enforcers also recovered one pistol, 20 hand bombs, Jihadi books and some sharp weapons.
Rajshahi Police Super Moazzem Hossain said six members of the RAB were bullet-injured during the gunfight.
On August 2, A youth was killed in a gunfight in Rajshahi city's Ashraf intersection.