A. At any time after the recordation of a certificate, but prior to the institution of condemnation proceedings, if the authorized condemnor and the owner of the property taken or damaged agree as to compensation for the property taken and damages, if any, caused by such taking, the authorized condemnor shall file with the court a petition so stating. A copy of the agreement shall be attached to the petition. If condemnation proceedings are already pending at the time such agreement is reached, the authorized condemnor shall not be required to file a petition, but shall file a motion to dismiss the condemnation proceedings containing an averment that such agreement has been reached. Upon the filing of such a petition or a motion to dismiss, the court shall enter an order confirming absolute and indefeasible title to the property in the condemning authority, or in the Commonwealth if the condemning authority is an agency of the Commonwealth. Such order shall be recorded in the clerk's office of each court in which the certificate is recorded. Upon entry of such order, the condemning authority shall be relieved of further obligation by virtue of having filed a certificate of deposit with the court.
B. If it shall appear from such petition and agreement, or motion to dismiss a pending suit, that no person other than those executing such agreement are entitled to the funds deposited with the court or represented by a certificate of deposit, the court shall direct that such funds, after payment therefrom of any taxes that may be charged against the property taken, be disbursed and distributed in accordance with the provisions stated in the petition, or motion, among the parties or persons entitled thereto. If it shall appear that a controversy exists as to the persons entitled to such funds, such distribution shall be made in accordance with the provisions of § 25.1-310.