The sheriff may, when he supposes there will be a necessity, order such number of citizens of his county, or request any military or militia company, to aid in preventing the rescue of a prisoner.