
731 A.2d 855 (1999)
1999 ME 89
Darryl ROBERTS
v.
STATE of Maine et al.
Supreme Judicial Court of Maine.
Argued June 7, 1999.
Decided June 21, 1999.
Robert E. Sandy, Jr. (orally), Sherman & Sandy, Waterville, for the Appellant.
Andrew Ketterer, Attorney General, Diane Sleek (orally), Assistant Attorney General, Augusta, for the Appellees.
Before WATHEN, C.J., and RUDMAN, DANA, ALEXANDER, and CALKINS, JJ.
*856 CALKINS, J.
[¶ 1] Darryl Roberts appeals from a judgment entered in the Superior Court (Cumberland County, Cole, J.) in favor of the State and corrections officer Robert Allenwood on Roberts' claims arising from a personal injury suffered while he was an inmate at the Maine Correctional Center. On appeal, Roberts contends that the court erred in (1) entering summary judgment for the State and Allenwood on immunity grounds on all but one claim, and (2) granting judgment for the State after a nonjury trial on the remaining claim. We affirm the judgment.
[¶ 2] The facts alleged in the complaint are as follows: On September 8, 1994, Roberts was an inmate at the Maine Correctional Center in Windham. Allenwood, the guard on duty that evening, after an argument with Roberts about the use of the telephone, ordered Roberts to return to his cell and "lock up." As Roberts entered his cell, he reached behind him with his left hand to close the door, which did not close smoothly. Allenwood then slammed the door shut with a great deal of force, and Roberts' left index finger was caught between the door jam and the door. The tip of Roberts' left index finger was severed as a result.
[¶ 3] Roberts alleged that the State is liable for Allenwood's actions as his employer and that the State was negligent in failing to (1) establish procedures to be followed by guards when returning an inmate to his cell and shutting the door; (2) maintain the door in a safe condition; and (3) obtain proper prompt medical treatment for Roberts. The complaint also sought damages from Allenwood, alleging that he was negligent and reckless.
[¶ 4] The State and Allenwood filed a motion for summary judgment.[1] They argued that Allenwood, and thereby the State, as Allenwood's employer, were immune from liability for his actions because Allenwood was performing a discretionary function in locking Roberts in his cell. The State also contended that it was immune from liability under the Maine Tort Claims Act for not having a policy regarding the lock up of prisoners. The State argued that Roberts could not pursue the medical treatment and negligent maintenance claims because they were not included in the notice of claim. See 14 M.R.S.A. § 8107(1)(B), (4) (1980 & Supp.1998). Roberts argued that the State and Allenwood were not immune from liability under the MTCA.
[¶ 5] The court granted summary judgment for the State and Allenwood on all claims except the claim of negligent maintenance of the door.[2] The court concluded that Allenwood was exercising the discretionary function of supervising a prisoner when he locked Roberts into his cell and, therefore, both Allenwood and the State came within the immunity for discretionary functions. See 14 M.R.S.A. §§ 8104-B(3), 8111(1)(C) (Supp.1998). Although Roberts argued that Allenwood was operating a public building when he shut the cell door, see id. § 8104-A(2), the court found that the focus of Allenwood's action *857 was the supervision of a prisoner and not the operation of a part of a building. Following a bench trial on the claim of negligent maintenance of the door, the court granted judgment for the State.

I. DISCRETIONARY FUNCTION IMMUNITY
[¶ 6] Roberts appeals from the grant of the summary judgment. A summary judgment is appropriate when a defendant is immune from tort liability, and we review a summary judgment de novo for errors of law. See Grossman v. Richards, 1999 ME 9, ¶ 3, 722 A.2d 371, 373; Erskine v. Commissioner of Corrections, 682 A.2d 681, 685 (Me.1996).
[¶ 7] Section 8111(1) of the MTCA grants immunity from liability to governmental employees who are performing a discretionary function:
Notwithstanding any liability that may have existed at common law, employees of governmental entities shall be absolutely immune from personal civil liability for the following:
. . . .
C. Performing or failing to perform any discretionary function or duty, whether or not the discretion is abused; and whether or not any statute, charter, ordinance, order, resolution, rule or resolve under which the discretionary function or duty is performed is valid....
. . . .
The absolute immunity provided by paragraph C shall be applicable whenever a discretionary act is reasonably encompassed by the duties of the governmental employee in question, regardless of whether the exercise of discretion is specifically authorized by statute, charter, ordinance, order, resolution, rule or resolve and shall be available to all governmental employees, including police officers and governmental employees involved in child welfare cases, who are required to exercise judgment or discretion in performing their official duties.
Governmental entities are likewise immune from liability for discretionary functions. See 14 M.R.S.A. § 8104-B(3).
[¶ 8] We have utilized a four-factor test to determine whether discretionary function immunity applies.
(1) Does the challenged act, omission, or decision necessarily involve a basic governmental policy, program or objective? (2) Is the questioned act, omission, or decision essential to the realization or accomplishment of that policy, program, or objective as opposed to one which would not change the course or direction of the policy, program, or objective? (3) Does the act, omission, or decision require the exercise of basic policy evaluation, judgment, and expertise on the part of the governmental agency involved? (4) Does the governmental agency involved possess the requisite constitutional, statutory, or lawful authority and duty to do or make the challenged act, omission, or decision?
Adriance v. Town of Standish, 687 A.2d 238, 240 (Me.1996) (quoting Darling v. Augusta Mental Health Inst., 535 A.2d 421, 426 (Me.1987)).
[¶ 9] Relying on the four factors, without going through them in detail, we held, in Erskine v. Commissioner of Corrections, 682 A.2d at 686, that "[t]he management and care of prisoners is a discretionary function." The federal district court, interpreting the Maine Tort Claims Act, came to the same conclusion in Ellis v. Meade, 887 F.Supp. 324 (D.Me.1995). In that case the court concluded that a jail guard was carrying out a discretionary function when he slapped a restrained prisoner on the buttocks. See id. at 331.
[¶ 10] In applying the four factors to the present case, there can be no dispute that corrections is a basic governmental program and that the supervision of inmates is essential to a corrections program. The supervision necessarily involves *858 the exercise of judgment by corrections officers, including the discretionary decision of when to order an inmate to his cell. That discretionary decision also includes the shutting of a cell door when the prisoner has failed to shut it or the door has failed to shut. Allenwood had the lawful authority to supervise Roberts. See 34-A M.R.S.A. § 3402(2) (1988) (superintendent of Maine Correctional Center "shall supervise and control" prisoners). The four-factor test compels the conclusion that Allenwood's alleged tortious acts were performed as part of a discretionary function.[3] Therefore, both the State and Allenwood are immune from liability on Roberts' claim that his injury resulted from Allenwood's action in shutting the cell door.[4]

II. NEGLIGENT MAINTENANCE OF CELL DOOR
[¶ 11] The trial court agreed with Roberts that there was a factual issue that had to be resolved at trial concerning whether the maintenance of the cell door was negligent. If the State had negligently maintained Roberts' cell door and if that negligent maintenance was a significant cause of the injury to Roberts, then the State would have been liable for the injury. "A governmental entity is liable for its negligent acts or omissions in the construction, operation or maintenance of any public building or the appurtenances to any public building." 14 M.R.S.A. § 8104-A(2). At the trial on the issue of the maintenance of the door, the State presented evidence that the 230 pound cell door closed in the manner it was designed to close and that it was no different from any other cell door. Although Roberts testified that something was wrong with the door, the fact finder was not compelled to believe him.[5]
The entry is:
Judgment affirmed.
NOTES
[1]  Their brief statement of material facts accompanying the motion, required by M.R. Civ. P. 7(d)(2), simply recounts that the State did not have insurance covering it or its employees for actions for which there is immunity under the Maine Tort Claims Act (MTCA) and that the notice of claim filed by Roberts pursuant to the MTCA did not mention a claim for failure to maintain the cell door or failure to provide suitable medical treatment. It is apparent from the written submissions of the parties to the Superior Court and the decision of the court that the parties and the court assumed that the factual allegations in the complaint were true for the purposes of the motion.
[2]  The court granted summary judgment to the State on the claims for medical treatment and failure to enact a policy for locking a prisoner in the cell on the grounds that the State is immune from such claims under the general grant of immunity in 14 M.R.S.A. § 8103 (1980) and that neither claim comes within any statutory exception to the grant of immunity. Roberts has not pursued his appeal of the summary judgment on these two claims.
[3]  Roberts argues that there was a dispute of fact as to whether Allenwood's conduct was so egregious as to exceed the scope of his discretionary function. Roberts, however, neither alleged in his complaint nor submitted any statement of fact indicating that Allenwood's actions were not reasonably encompassed by his discretionary function.
[4]  Because we conclude that Allenwood and the State are both immune from liability stemming from Allenwood's closing the door on Roberts' finger due to the discretionary character of such action, we need not reach Roberts' alternative claim that the closing of the door was a function in the nature of operating a governmental building. See 14 M.R.S.A. § 8104-A(2); see also ABT & A Co. v. State, 644 A.2d 460, 460 (Me.1994).
[5]  Because the trial court was not compelled to find for Roberts on the negligent maintenance claim, we need not address the State's argument that it should have been granted summary judgment on that claim because of Roberts' failure to comply with the notice of claim provisions of the MTCA. See 14 M.R.S.A. § 8107(1).
