The prisoner shall be delivered to the sheriff or deputy sheriff of the county from which the prisoner has been sent, on demand made immediately preceding or during the term at which the prisoner is triable.