Bangladesh police said Friday a suspected Islamist extremist accused of carrying out a deadly attack on a prayer rally last month has been shot dead in a gunfight while in their custody.