A person who performs another's duty to a third person or to the public is entitled to restitution from the other as necessary to prevent unjust enrichment, if the circumstances justify the decision to intervene without request.
Unrequested intervention may be justified in the following circumstances:
the claimant may be justified in paying another's money debt if there is no prejudice to the obligor in substituting a liability in restitution for the original obligation;
the claimant may be justified in performing another's duty to furnish necessaries to a third person, to avoid imminent harm to the interests of the third person; and
the claimant may be justified in performing another's duty to the public, if performance is urgently required for the protection of public health, safety, or general welfare.
There is no unjust enrichment and no claim in restitution by the rule of this section except insofar as the claimant's intervention has relieved the defendant of an otherwise enforceable obligation.