Authorities say a prisoner attempting a jail break grabbed an assault rifle from a guard and opened fire .