Investigators said inmates ambushed deputies and locked them inside a cell. Those inmates released three others and took off.