If a matter in which the state is interested is pending in a court distant from the capital, and it is necessary for the state to be represented by counsel, the attorney general, with the approval of the governor, may engage one or more attorneys to appear for the attorney general. The attorney general may pay for these services out of appropriations for the attorney general's office.