The attorney general may replevin public records which have been unlawfully transferred or removed in violation of sections 15.17, subdivisions 2 and 3; 138.163; 138.17; and 138.21. The records shall be returned to the office of origin, or, in the case of state archives, to the society.