If an agent receives anything for the benefit of the agent's principal, to the possession of which another person is entitled, the agent on demand must surrender it, or so much of it as the agent has under the agent's control at the time of the demand, to such other person, on being indemnified for any advance which the agent has made to the agent's principal in good faith on account of the same. The agent is responsible therefor, if the agent delivers it to the agent's principal after notice from the owner.
N.D.C.C. § 3-04-03