Whenever the grantor, or his successor in title, in any deed of trust by which any real property is conveyed in trust to secure debts or indemnify sureties dies prior to a trustee's sale held pursuant to the deed of trust and the deed of trust contains no definite provision for the distribution of any surplus in the event of the death of the grantor or his successors in title prior to the trustee's sale held pursuant to the deed of trust, or contains a provision that such surplus shall be paid to the grantor or his heirs or assigns or personal representative, then any surplus of the proceeds of the sale remaining in the possession of the trustee, after discharging the expenses of executing the trust, all tax liens upon the property sold, all debts and obligations secured by the deed of trust, and, in order of their priority, if any, the remaining subsequent debts and obligations secured by the deed, and any liens of record inferior to the deed of trust under which the sale is made, with lawful interest, shall be paid by the trustee to the personal representative of the decedent.
Any such funds possessed by the personal representative shall constitute assets for the payment by him of any debts and demands against the decedent's estate remaining unsatisfied after the personal estate has been exhausted. Any surplus of the funds so paid to the personal representative and remaining in his possession after the satisfaction of all debts and demands against the estate shall be paid over by him, if the decedent died intestate as to the real property embraced in the deed of trust, to the heirs at law of the decedent, or their successors in title, and if the decedent died testate as to the real property embraced in the deed of trust, then such surplus shall be paid to the persons entitled to the real property under the terms of the decedent's will, or to their successors in title.
Va. Code § 55.1-331