The sheriff shall have the charge and custody of the county jail and receive and safely keep therein all persons lawfully committed thereto and not release any person therefrom unless discharged by due course of law.
Minn. Stat. § 387.11
(914) RL s 556