delivered the opinion of the Court.
Code § 8.01-66.9 gives the Commonwealth a lien for the amount due to state-operated hospitals and rehabilitative facilities where such institutions have afforded medical care to a person injured by the alleged negligence of another. The lien is imposed on the claim of the injured person against the alleged tort-feasor. The statute empowers the court in which a suit against such a tortfeasor is pending to reduce the Commonwealth’s lien, and to apportion the recovery among the parties entitled thereto, “where the first offer acceptable to plaintiffs attorney is not made until seventy-two hours prior to the date for trial.” Id. In this appeal, we apply that provision to a situation in which the defendant, outside the 72-hour period, made an offer that was ultimately accepted, but where the plaintiffs attorney could not ascertain whether the offer was “acceptable” until the court, within the 72-*110hour period, reduced the Commonwealth’s lien and thus determined the amount the plaintiff would receive.
On January 6, 1983, Eric R. Smith, a 2-Vi year old child, darted into traffic on a busy highway in Fairfax County. A truck driven by Marshall A. Ramsey, Jr., struck the child, causing severe, permanent injuries. Eric was treated at the Children’s Rehabilitation Center at the University of Virginia Hospital, in Charlottesville, and at the Fairfax Hospital. A part of his treatment was paid for by the Medicaid program administered by the Commonwealth. In 1984, Eric’s counsel received notices of liens, pursuant to Code § 8.01-66.9, in the amounts of $11,947.13 and $41,995.96, from the Virginia Department of Health on behalf of the Medicaid program and from the Rector and Visitors of the University of Virginia on behalf of that hospital, respectively.
Eric’s counsel attempted to negotiate complete waivers of the liens with the Attorney General, pursuant to Code § 2.1-127, but the negotiations were unsuccessful. In 1986, Eric’s counsel filed a motion for judgment against Mr. Ramsey naming the Commonwealth, the Department of Medical Assistance Services, the University of Virginia Hospital, and the Comptroller of the Department of Accounts as defendants. The motion for judgment sought damages against Mr. Ramsey in the amount of $1,000,000 for Eric’s injuries and also requested the court to set aside the Medicaid and hospital liens. The governmental parties filed a demurrer and a plea of sovereign immunity. The court sustained the demurrer and dismissed the governmental parties, leaving Ramsey as the sole defendant.
Mr. Ramsey’s truck was covered by a policy of insurance with an applicable limit of $100,000. The insurance carrier offered the full amount of the policy limit in settlement, provided that all issues relating to the Commonwealth’s liens be resolved and that Mr. Ramsey be released from any further liability. Plaintiffs counsel did not accept the offer, but caused the case to be set for trial. He stated to the court that he could not regard the offer as “acceptable” if, after payment of the liens and attorney’s fees, such a small amount would remain for the care of the permanently-impaired child.
On February 16, 1988, the date set for trial, the plaintiffs attorney represented to the court that a $100,000 offer was outstanding, but that it was not an “acceptable” offer because of the Commonwealth’s liens. He moved the court to invoke the provi*111sions of Code § 8.01-66.9 and to reduce the Commonwealth’s liens to zero. Counsel advised the court that if that were done, the outstanding offer would be an “acceptable” one. Although the Commonwealth was no longer a party, the Attorney General appeared in opposition to the plaintiffs motion.
The court took the question under consideration and thereafter ruled, in a written opinion, that in the circumstances, no offer “acceptable to plaintiffs attorney” had been made outside the 72-hour period. The court entered a final order, reducing the hospital’s lien to $11,679, reducing the Medicaid lien to $3,321, reducing plaintiffs counsel’s fee to $25,000, approving an infant settlement agreement reached between plaintiff and defendant, and ordering that the $60,000 balance be held in trust in an income-bearing investment, approved by the court, until the infant plaintiffs 18th birthday. We granted an appeal to the Commonwealth and to the Rector and Visitors.
In 1972, the General Assembly enacted Code § 32-139.1, which gave the Commonwealth and its institutions a lien for medical services rendered to a patient, upon the patient’s claim against a tort-feasor. Acts 1972, c. 481. That section, as amended, became Code § 8.01-66.9 in 1979. Acts 1979, c. 772. The lien given by that section has always been subject to the authority of the Attorney General, given by Code § 2.1-127, to compromise and settle the Commonwealth’s interest, with the approval of the head of the appropriate institution and, in the case of claims over a stated amount, with the approval of the Governor.
Inevitably, a great many tort actions are settled only “at the courthouse door,” on or very close to the day fixed for trial. Where the plaintiffs claim is encumbered by a Commonwealth’s lien under Code § 8.01-66.9, it would be nearly impossible to obtain the requisite approvals within the executive branch of government in time to consummate a settlement before trial, unless efforts to do so were initiated well in advance. If plaintiff and defendant reached a tentative agreement shortly before trial, subject to the Attorney General’s willingness to compromise the lien, the difficulty of obtaining the requisite approvals before the trial begins would leave the parties only the alternatives of a long continuance, necessitated by a crowded docket, or submission to the hazards of trial.
Because settlements, even last-minute ones, are very much in the public interest, the General Assembly, in 1981, added the *112last sentence to Code § 8.01-66.9. Acts 1981, c. 562. The effect of the amendment was to vest in the trial judge, in the circumstances specified by the statute, the authority, otherwise vested in the Attorney General, the Governor, and the appropriate department head by Code § 2.1-127, to compromise and reduce the Commonwealth’s lien. The purpose of the amendment was to reduce expense and delay, to avoid litigation, and to promote settlements.
The Attorney General argues on appeal that the trial court lacked jurisdiction to compromise the liens because the defendant’s $100,000 offer, which was ultimately accepted, was not first tendered within the “72-hour window” of time prior to the trial date, but had actually been “on the table” for several years. The plaintiff contends that the statute vests in plaintiffs counsel the responsibility of deciding when an offer is “acceptable,” that he cannot know whether any offer will meet that test until he can learn what his client’s net recovery will be, and that the net recovery cannot be ascertained until it is known how much will be needed to discharge the liens. Within the “72-hour window,” the plaintiff argues, an unacceptable offer may be converted into an acceptable one by judicial intervention reducing the liens, and the statute’s aim is to facilitate that result.
We agree with the plaintiffs analysis. The legislative purpose of the 1981 amendment is met only if the statute is construed to promote, not to frustrate, settlements. A defendant’s offer might be adequate to settle the case if the plaintiff stands to receive a substantial part of it. If it appears, however, that liens will absorb most or all of the net recovery, the plaintiff has little to lose, and a possibility of gain, by going to trial. If the liens can be administratively compromised in advance under Code § 2.1-127, the settlement offer may become “acceptable,” but if no such compromise is reached, the court is given the authority, within the “72-hour window” of time,* in its discretion, to effect a reduction of the liens which will cause the defendant’s settlement offer to become “acceptable” to plaintiffs counsel, thus enabling the parties to settle the case.
*113We conclude that the court acted within its statutory authority in reducing the liens and apportioning the settlement. Accordingly, the judgment will be
Affirmed.