A Kenyan official says a suspected Islamic extremist grabbed a rifle from an officer and attempted to shoot his way to freedom from a military camp where he was being held in Garissa in eastern Kenya.

Garissa County coordinator Mohamud Ali Saleh said Tuesday the suspect snatched a rifle from one of the officers and tried to escape.

Saleh said hundreds of officers cordoned off the area and engaged the suspect in a shootout until the bullets from the rifle he had stolen ran out and he was arrested. Saleh said the incident caused panic in Garissa where memories are still fresh of 147 people killed in a university in an April 2 attack by four gunmen. Somali extremists al-Shabab claimed responsibility for that attack.