
669 So.2d 958 (1995)
Arthur LANE, et al.
v.
ZONING BOARD OF ADJUSTMENT OF the CITY OF TALLADEGA.
2940760.
Court of Civil Appeals of Alabama.
October 20, 1995.
*959 Donald E. Blankenship, Birmingham, for appellants.
O. Stanley Thornton of Wooten, Thornton, Carpenter, O'Brien, Lazenby & Lawrence, Talladega, for appellee.
MONROE, Judge.
This appeal involves the issue whether a county government is subject to a city's zoning ordinances when building a county jail.
Talladega County is under a federal mandate to build a jail that complies with federal law. The land the Talladega County Commission purchased on which to build the jail is within the City of Talladega's city limits and is zoned R-1, an agricultural residential zoning district. The appellants, Arthur Lane, John Reynolds, Glenn Swain, Henry Easley, and John Turner, are residents of the City of Talladega and live near the new jail.
After construction began on the jail, the residents filed a written request with the city's building inspector asking whether the county had to abide by the city's zoning ordinances in building the jail. The inspector said the county was not bound by the zoning ordinances in this situation, and the residents appealed to the Zoning Board of Adjustment. After a hearing, the board affirmed the inspector's decision, and the residents appealed to the Talladega Circuit Court. In the circuit court, the zoning board filed a motion for summary judgment, supported by various documents. The circuit court entered a summary judgment for the zoning board. The residents appeal.
The residents argue that the trial court erred in entering the summary judgment because, they point out, appeals from the zoning board to the circuit court are to be tried de novo. By entering the summary judgment for the zoning board, the residents say, they were "denied full access" to the court.
The residents' argument is without merit. Just as a circuit court can enter a summary judgment when it has a case originally, it may enter a summary judgment when a case is before it on an appeal for a trial de novo. See e.g., Union Bank v. Fay, 632 So.2d 493 (Ala.Civ.App.1993).
To enter a summary judgment, the trial court must determine that there is no genuine issue of material fact and that the moving party is entitled to a judgment as a matter of law. Rule 56, Ala.R.Civ.P. In their brief to this court, the residents argue that if there is a scintilla of evidence supporting the position of the nonmoving party, a summary judgment should not be granted. However, that has not been the law in this state for more than eight years. For actions filed after June 11, 1987, which would include this case, Rule 56 is read in conjunction with the "substantial evidence rule," § 12-21-12, Ala.Code 1975. See Bass v. SouthTrust Bank of Baldwin County, 538 So.2d 794, 797-98 (Ala. 1989).
"[T]o defeat a defendant's properly supported motion for summary judgment, the plaintiff must present `substantial evidence,' i.e., `evidence of such weight and quality that fair-minded persons in the exercise of impartial judgment can reasonably infer the existence of the fact sought to be proved.' West v. Founders Life Assurance Co. of Florida, 547 So.2d 870, 871 (Ala.1989)." Altadena Valley Golf & Country Club v. Blue Cross & Blue Shield of Alabama, 644 So.2d 913 (Ala. 1994).
"On a motion for summary judgment, when the movant makes a prima facie showing that no genuine issue of material fact exists, the burden shifts to the nonmovant to show `substantial evidence' in support of his or her position. Bean v. Craig, 557 So.2d 1249, 1252 (Ala.1990)." Altadena Valley Golf & Country Club, 644 So.2d at 915.
In this case, there is no dispute as to the facts. Instead, the residents take issue with the trial court's finding that operating a county jail is a governmental function. Alabama law is well settled that city zoning ordinances do not apply to the operation of a governmental function by a governing body, as opposed to a proprietary function. City of Birmingham v. Scogin, 269 Ala. 679, 115 So.2d 505 (1959) and cases cited therein. A function is a governmental function if it is the means by which the governing entity exercises the sovereign power for the *960 benefit of all citizens. See Hilliard v. City of Huntsville, 585 So.2d 889, 890 (Ala.1991).
As the trial court said in its judgment, construction and maintenance of a county jail by the county commission are required by statute. § 11-14-10, Ala.Code 1975. A county has the affirmative duty to maintain a county jail and keep it in a state of repair. King v. Colbert County, 620 So.2d 623 (Ala.1993). We agree with the trial court's finding that construction and maintenance "of a jail by a county [are] mandated governmental function[s] performed by the County in furtherance of its duty to discharge its obligation for the health, safety and general welfare of the public."
The Zoning Board of Adjustment of the City of Talladega was entitled to a judgment as a matter of law. The trial court properly entered the summary judgment for the zoning board. That judgment is affirmed.
AFFIRMED.
ROBERTSON, P.J., and THIGPEN, YATES, and CRAWLEY, JJ., concur.
