
514 N.W.2d 681 (1994)
The UNITED HOSPITAL, Plaintiff, Appellee, and Cross-Appellant,
v.
Barry D'ANNUNZIO, Defendant and Third-Party Plaintiff,
v.
GRAND FORKS COUNTY, North Dakota, Defendant, Third-Party Defendant, Appellant, and Cross-Appellee,
The MEDICAL CENTER REHABILITATION HOSPITAL AND CLINICS, Plaintiff, Appellee, and Cross-Appellant,
v.
Barry D'ANNUNZIO, Defendant and Third-Party Plaintiff,
v.
GRAND FORKS COUNTY, North Dakota, Defendant, Third-Party Defendant, Appellant, and Cross-Appellee.
Civ. Nos. 930162, 930163.
Supreme Court of North Dakota.
March 30, 1994.
*682 Patrick W. Fisher of McConn, Fisher, Olson & Daley, Grand Forks, for defendant, third-party defendant, appellant, and cross-appellee.
Gordon W. Myerchin of McElroy, Camrud, Maddock & Olson, Grand Forks, for plaintiffs, appellees, and cross-appellants.
*683 SANDSTROM, Justice.
In this case, we address the responsibility of a governmental entity to pay for prisoner medical care. After a prisoner attempted suicide in the Grand Forks County Jail, two hospitals provided medical care. In separate suits, the hospitals sued Grand Forks County for the cost of the medical care. In both cases, the district court held the County responsible for payment of the medical bills. The district court denied prejudgment interest. The County appeals, claiming its duty to ensure prisoners receive medical care is distinguishable and separate from a duty to pay for the care. The hospitals cross appeal, claiming they are entitled to prejudgment interest.
We affirm, holding: (1) under N.D.C.C. § 12-44.1-14, a county is responsible for paying for medical care provided to a prisoner while in custody, subject to reimbursement from the prisoner; and (2) the hospitals are not entitled to prejudgment interest, because their claims were not certain.

I

A
On December 28, 1988, Barry D'Annunzio was arrested by a Grand Forks police officer and incarcerated at the Grand Forks Correctional Center. The following day, D'Annunzio attempted suicide by hanging himself in a visitation room. D'Annunzio was taken by ambulance to United Hospital for treatment. D'Annunzio had suffered hypoxic brain injury.
D'Annunzio remained at United Hospital until February 7, 1989, when he was transferred to the Medical Center Rehabilitation Hospital. The criminal charges against D'Annunzio were dismissed without prejudice on May 5, 1989. D'Annunzio was discharged from the Medical Center Rehabilitation Hospital on May 10, 1989.
In June 1989, United Hospital submitted a claim for $57,947.41 to the Grand Forks County Commission for D'Annunzio's medical care. The county commission denied the claim. The hospital did not appeal the denial.
In November 1989, United Hospital sued Grand Forks County and D'Annunzio for the cost of D'Annunzio's medical care. The district court granted the County's motion to dismiss, concluding the court lacked subject matter jurisdiction because United Hospital failed to appeal the county commission's decision denying the claim. On appeal, this Court reversed and remanded the case for further proceedings. See United Hosp. v. D'Annunzio, 466 N.W.2d 595 (N.D.1991); United Hosp. v. D'Annunzio, 462 N.W.2d 652 (N.D.1990).
On remand, D'Annunzio confessed judgment in favor of United Hospital. The district court granted United Hospital's motion for summary judgment on the issue of the County's liability. A bench trial was held on United Hospital's claim. Following the trial, the district court ordered judgment in United Hospital's favor for $57,947.41. The district court denied United Hospital's request for prejudgment interest.

B
In September 1989, the Medical Center Rehabilitation Hospital submitted a claim to the Grand Forks County Commission for D'Annunzio's care. The county commission denied the claim. In November 1989, the Rehabilitation Hospital sued Grand Forks County and D'Annunzio for $55,830.38, for the cost of D'Annunzio's medical care. In March 1992, the district court granted the Rehabilitation Hospital's motion for summary judgment on the issue of the County's liability. A bench trial was held on the Rehabilitation Hospital's claim. Following trial, the district court ordered judgment against the County for $52,656.13. The district court denied the Rehabilitation Hospital's request for prejudgment interest.

C
Grand Forks County appeals from both judgments. Grand Forks County contends it is not responsible for D'Annunzio's medical expenses. United Hospital and the Rehabilitation Hospital cross-appeal, claiming they are entitled to prejudgment interest.


*684 II
The Eighth Amendment's proscription against cruel and unusual punishments is violated by "deliberate indifference to serious medical needs of prisoners." Estelle v. Gamble, 429 U.S. 97, 103, 97 S.Ct. 285, 290, 50 L.Ed.2d 251, 260 (1976); Ennis v. Dasovick, 506 N.W.2d 386, 389 (N.D.1993). Under the Eighth Amendment, the government must "provide medical care for those whom it is punishing by incarceration." Estelle v. Gamble, 429 U.S. at 104, 97 S.Ct. at 291, 50 L.Ed.2d at 259. The Eighth Amendment, however, does not apply to pretrial prisoners who have not been convicted of a crime. Revere v. Massachusetts General Hospital, 463 U.S. 239, 244, 103 S.Ct. 2979, 2983, 77 L.Ed.2d 605, 611 (1983). Pretrial prisoners are protected under the Due Process Clause of the Fourteenth Amendment. "[T]he due process rights of a [pretrial prisoner] ... are at least as great as the Eighth Amendment protections available to a convicted prisoner." Revere; Boswell v. Sherburne County, 849 F.2d 1117, 1121 (8th Cir.1988).
A governmental entity fulfills its constitutional obligation to injured prisoners by ensuring medical care needed is in fact provided. "[A]s long as the governmental entity ensures that the medical care needed is in fact provided, the Constitution does not dictate how the cost of that care should be allocated as between the entity and the provider of the care. That is a matter of state law." Revere, 463 U.S. at 245, 103 S.Ct. at 2983, 77 L.Ed.2d at 611.
N.D.C.C. § 12-44.1-14 provides:
"Inmate rights. The governing body of each jail shall:
1. Ensure and facilitate the right of inmates to have confidential access to attorneys and their authorized representatives.
2. Ensure that inmates are not subjected to discrimination based on race, national origin, color, creed, sex, economic status, or political belief.
3. Ensure equal access by male and female inmates to programs and services.
4. Ensure access to mail, telephone use, and visitors.
5. Ensure that inmates are properly fed, clothed, and housed.
6. Ensure that inmates have adequate medical care.
7. Ensure that inmates may reasonably exercise their religious beliefs."
The County contends, under Revere and N.D.C.C. § 12-44.1-14, its only responsibility is to "ensure" prisoners receive adequate medical care. According to the County, the duty to "ensure" prisoners have adequate medical care is distinguishable and separate from an obligation to pay for the care. The County contends it should not be held responsible for the cost of D'Annunzio's care, because United Hospital and the Rehabilitation Hospital routinely provide free care to indigent persons. The hospitals disagree, arguing that under N.D.C.C. § 12-44.1-14 the County is responsible for paying for the cost of a prisoner's medical care.
The language in N.D.C.C. § 12-44.1-14(6) is ambiguous, and therefore, it must be construed to give effect to the legislature's intent. McCroskey v. Cass Cty., 303 N.W.2d 330, 336 (N.D.1981). Section 12-44.1-14, N.D.C.C., was enacted by the Legislative Assembly in 1979. See S.L.1979, ch. 172, § 14. The legislative history is silent on what the legislature intended when it required the governing bodies of jails "ensure that inmates have adequate medical care."
When an act of the legislature is ambiguous, we give weight to the practical and contemporaneous construction of the statute by the attorney general and the officers charged with administering the statute. Ficek v. International Bro. of Boilermakers, etc., 219 N.W.2d 860, 872 (N.D.1974); State v. Reich, 298 N.W.2d 468, 471 (N.D.1980). Additional weight is given when the construction has been implicitly approved of by the legislature. Halldorson v. State School Const. Fund, 224 N.W.2d 814, 821 (N.D. 1974); Horst v. Guy, 219 N.W.2d 153, 159 (N.D.1974).
In 1981, as required by N.D.C.C. § 12-44.1-24,[1] the attorney general adopted rules *685 for the care and treatment of inmates. The rule implementing N.D.C.C. § 12-44.1-14 provided, in part:
"Medical care access. Inmates shall have access to necessary emergency medical care, including, but not limited to, physical, psychiatric, and dental care. The cost of such medical care shall be paid subject to reimbursement from the inmate." N.D.Admin.Code § 10-05-06-02 (1981).
In 1987, the attorney general amended § 10-05-06-02, removing the word "paid." Section 10-05-06-02 now provides: "The cost of such medical care shall be subject to reimbursement from the inmate." N.D.Admin.Code § 10-05-06-02. According to an internal memorandum dated June 22, 1987, from an assistant attorney general to Attorney General Nicholas J. Spaeth, the word "paid" was stricken to make clear the cost of medical care is subject to reimbursement from the prisoner.
"As I have stated earlier, the change to N.D.Admin.Code § 10-05-06-02 regarding medical care access by deleting the word `paid' would be in accordance with our interpretation and application of that rule. A county's responsibility for the payment of medical expenses will be dependent upon statutory and constitutional provisions. By this change, it is not intended that the counties avoid any responsibility which it [sic] may otherwise have to provide medical care to inmates. This amendment will merely clear up any confusion that may be present as to whether or not this rule requires the county to pay medical expenses in all cases. As stated previously, this rule merely sets forth a reimbursement obligation by the inmate if medical expenses are paid by the county. Any obligation which may be imposed upon a county for the payment of medical expenses is beyond the scope of this rule."
In addition to the administrative rule, the attorney general issued a formal opinion on a municipality's responsibility to pay for medical care given to prisoners. Although not binding on this Court, attorney general's opinions are entitled to respect, and this Court will follow them if they are persuasive. Svanes v. Grenz, 492 N.W.2d 576, 579 (N.D. 1992); State v. Beilke, 489 N.W.2d 589, 593 (N.D.1992). A question presented in Attorney General's Opinion 86-14 was:
"Whether a municipality is responsible for the cost of medical care provided to an indigent prisoner incarcerated at a county jail for a violation of a city ordinance."
N.D.Op.Att'y.Gen. 14, p. 1 (1986).
The attorney general concluded:
"[A] municipality is responsible for the cost of medical care provided to an indigent prisoner incarcerated at a county jail for a violation of a city ordinance if required by a contract for use of the services and facilities of a county correctional center."
N.D.Op.Att'y.Gen. 14, p. 1 (1986).
The attorney general explained:
"If the city ... maintained its own jail facility, it would be required to provide medical services to its inmates pursuant to N.D.C.C. § 12-44.1-14(6). In addition, such city correctional facility would be required to pay the cost of such medical care for those inmates who are unable to pay for such care subject to reimbursement from the inmate should emergency medical care be required. In light of the decision of the United States Supreme Court in Revere v. Massachusetts General Hospital, supra, the city may also be required to pay for such non-emergency medical care of an indigent inmate subject, of course, to reimbursement from that inmate."
N.D.Op.Att'y Gen. 14, p. 4 (1986).
Attorney General's Opinion 86-14 refers to two letters drafted by an assistant attorney general on the issue of a municipality's responsibility to pay for a prisoner's medical care. The first letter, dated October 19, 1981, explained:

*686 "North Dakota law and rules require the governing body of each jail to provide for the medical care and treatment of its inmates. Inherent in this obligation is the duty to pay for that medical care and treatment if the inmate is unable to pay for it.
* * * * * *
"It would be illogical to assume that the governing body of a jail would be financially responsible for the medical care and treatment of an inmate if provided in the jail, but would not be financially responsible for that same treatment if provided by an established medical facility such as a local hospital."
The second letter, dated November 27, 1984, explained:
"If an inmate is indigent, has no insurance, and is not eligible for public assistance, ... the city would then have the ultimate responsible [sic] for medical care costs of a city inmate."
The legal opinions expressed by an assistant attorney general are the opinions of the attorney general. See Walker v. Weilenman, 143 N.W.2d 689, 697 (N.D.1966).
The attorney general's interpretation of N.D.C.C. § 12-44.1-14 is persuasive. The duty to "ensure that inmates have adequate medical care" includes the inherent duty to pay for that care. Section 12-44.1-14 places a duty on the governing body of a jail to pay for medical care and treatment provided to individuals in custody. After paying for the care, the governing body of the jail can seek reimbursement from the prisoner who received the care. The governing body's interest is one of subrogation. The district court correctly concluded Grand Forks County was responsible for the cost of D'Annunzio's medical care.

III
United Hospital and the Medical Center Rehabilitation Hospital claim under N.D.C.C. §§ 32-03-04 and 32-03-10 they are entitled to prejudgment interest.
N.D.C.C. § 32-03-04, provides:
"Interest on damages.Every person who is entitled to recover damages certain or capable of being made certain by calculation, the right to recover which is vested in him upon a particular day, also is entitled to recover interest thereon from that day, except for such time as the debtor is prevented by law or by the act of the creditor from paying the debt."
N.D.C.C. § 32-03-10, provides:
"Damages for breach of obligation to pay money.The detriment caused by the breach of an obligation to pay money only is deemed to be the amount due by the terms of the obligation, with interest thereon."
The County argues the hospitals are not entitled to prejudgment interest because the right to recover was not vested on a particular day and the amount due to each hospital was in dispute.
We have construed the ambiguous language of N.D.C.C. § 12-44.1-14(6) as creating an implied-in-law contract between Grand Forks County and the two hospitals. "The doctrine of unjust enrichment serves as a basis for requiring restitution of benefits conferred in the absence of an express or implied in fact contract." Midland Diesel Service & Engine v. Sivertson, 307 N.W.2d 555, 557 (N.D.1981). Ordinarily, recovery based on unjust enrichment is an equitable allowance expressly unrelated to any previous obligation, and therefore, the right to recover is not vested. In such situations, an award of prejudgment interest is not appropriate. Midland Diesel at 558.
The County's obligation to pay for a prisoner's medical care is fixed by statute. The language in N.D.C.C. § 12-44.1-14(6), however, is ambiguous. Because this Court had not previously construed N.D.C.C. § 12-44.1-14 the hospitals' claims were uncertain and unliquidated. See Crowston v. Jamestown Pub. Sch. Dist. No. 1, 335 N.W.2d 775, 780 n. 3 (N.D.1983) (teachers' rights to recover sick leave pay were neither fixed nor capable of being made certain until day of trial court's decision, and therefore, the teachers were not entitled to prejudgment interest); Super Hooper, Inc. v. Dietrich & Sons, Inc., 347 N.W.2d 152, 156 (N.D.1984) *687 (if the terms of a contract are ambiguous, a claim is unliquidated and prejudgment interest is not appropriately awarded).
The judgments of the district court are affirmed. Costs on appeal are awarded to United Hospital and the Medical Center Rehabilitation Hospital.
VANDE WALLE, C.J., and NEUMANN, LEVINE and MESCHKE, JJ., concur.
NOTES
[1]  N.D.C.C. § 12-44.1-24 (1979), provided, in part:

"The attorney general shall:
1. Prescribe rules and regulations pursuant to chapter 28-32 establishing minimum standards for the construction, operation, and maintenance of public or private juvenile detention centers, county and city jails, and regional corrections centers.
2. Prescribe rules for the care and treatment of inmates."
