The class I railroad corporation employing a special peace officer is solely responsible for the compensation of the special peace officer and is civilly liable for any action of the officer arising out of the officer's actions as a special peace officer. The class I railroad corporation employing a special peace officer shall hold the state, its subdivisions, and the officers and employees of the state and its subdivisions harmless and indemnify them from any claim or liability, including costs and attorney fees, arising out of any action of a special peace officer or the certification of the special peace officer by the state.
§ 44-4-904, MCA