The officer or persons executing the Governor's warrant of arrest, or the agent of the demanding state to whom the prisoner may have been delivered may, when necessary, confine the prisoner in the jail of any county or first or second class municipality through which he may pass; and the keeper of such jail must receive and safely keep the prisoner until the officer or person having charge of him is ready to proceed on his route, such officer or person being chargeable with the expense of keeping.
SDCL 23-24-13