
    2005 SD 92
    Benjamin ELLIOTT, Petitioner and Appellant, v. BOARD OF COUNTY COMMISSIONERS OF LAKE COUNTY, South Dakota, Respondent and Appellee, and Lake Madison Development Association, and Larry and Judy Lund, et al., Lake County Residents and Property Owners, Intervenors and Appellees.
    No. 23425.
    Supreme Court of South Dakota.
    Argued April 26, 2005.
    Decided Aug. 17, 2005.
    Brian J. Donahoe of Cutler & Donahoe, LLP, Sioux Falls, South Dakota, Attorneys for petitioner and appellant.
    Chris S. Giles, Lake County State’s Attorney, Madison, South Dakota, Attorneys for respondent and appellee Lake County Board of Commissioners.
    Debra S. Sittig of Myers, Peters, Hoffman, Billion & Pfeiffer, Sioux Falls, South Dakota, Attorneys for intervenors and ap-pellees Lake Madison Development, et al.
   MEIERHENRY, Justice.

[¶ 1.] This appeal is from the trial court’s review of the decision of the Lake County Board of Commissioners to deny a building permit application for a hog confinement facility. The trial court affirmed the denial. Because we question whether the trial court had jurisdiction, we remand to the trial court.

Facts and Procedural Background

[¶ 2.] In early 2001, Benjamin Elliott began plans to construct and operate a hog farrowing facility on his property in Lake County, South Dakota. Lake County Zoning Ordinances required a conditional use permit for all concentrated animal feeding operations of over 500 animal units. Operations for fewer than 500 animal units were permitted without a conditional use permit. Initially, Elliott submitted and the County denied a conditional use permit for a 750-animal unit facility. After the County’s denial, Elliott scaled down his plan. He decided, instead, to construct a high-rise facility which would accommodate fewer than 500 animal units. Since his plan involved fewer than 500 animal units, he was not required to seek a conditional use permit from the County. He did, however, need a building permit for the new building.

[¶ 3.] The Lake County Zoning Officer [Officer] responsible for issuing county building permits acknowledged receipt of Elliott’s completed application for the high-rise building on August 31, 2001. Her handwritten receipt addressed to Elliott on August 31, 2001 stated:

Received from Mr. Elliott complete plan w/all of the items needed to fulfill item #2 in Section 802 — Article VIII of the Lake Co. Zoning Book. This is in regards to the application for “Class E” Animal Confinement Unit.

She also testified at trial that Elliott’s application had met all building permit requirements and that normally she would have issued the permit. She, however, neither approved nor denied his application despite her acknowledgment that it met all the regulatory requirements. Instead, she deferred Elliott’s application to the Lake County Board of Commissioners (Commissioners). She explained that she deferred to the Commissioners (1) because she had reservations about issuing the permit so quickly after the Commissioners’ rejection of Elliott’s similar plan, (2) because she knew that the Commissioners had discussed placing a moratorium on new animal confinement feeding operation permits, and (3) because of a letter from the Lake County State’s Attorney asking her not to issue any additional building permits for the construction and development of animal feeding confinement operations. There is no dispute that she failed to act upon Elliott’s application.

[¶ 4.] On September 4, 2001, the Commissioners placed a moratorium on the issuance of all building permits for new animal confinement operations until they made revisions to the Lake County Comprehensive Zoning Plan. At the same time, the Commissioners tabled Elliott’s building permit application indefinitely. Ten months later in July of 2002, the Commissioners amended the comprehensive zoning plan to require a conditional use permit for all animal confinement operations in Lake County.

[¶ 5.] On September 3, 2002, the Commissioners finally acted upon Elliott’s building permit application. As part of a regularly scheduled county commission meeting, the Commissioners denied his request. The Commissioners’ minutes recorded the decision as follows:

ELLIOTT BLDG PERMIT
Ben Elliott and Brian Donahoe Atty presented testimony for a tabled bldg permit request for an animal confinement. Also present was Chris Giles States Atty. Deb Reinicke Zoning & fifteen concerned citizens. Mr. Elliott presented a video explaining hog confinement operations. Motion Jorgensen, second Johannsen to deny the building permit application for Ben Elliott based on the following reasons: (1) This structure does not appear to be conductive [sic] to the promotion of the overall public health, safety, morals or general welfare (2) the proximity to neighboring residences and to Lake Madison, coupled with the objections from those area residents should be taken into account. Roll call vote: Johannsen aye, Jorgen-sen aye, Vanhove nay, Verhey aye & Leighton aye. 4-1 vote. Motion carried.

The Commissioners consistently represented to Elliott and to the trial court that they had applied the pre-amended ordinances and had only considered Elliott’s request as a request for a building permit. Elliott appealed the Commissioners’ decision to circuit court.

[¶ 6.] Elliott entitled his pleading to circuit court, “Petition Contesting Denial of Building Permit and Notice of Appeal.” The “petition” part of the pleading asked the court for relief under the authority of SDCL 11-2-61 as an appeal from a county board of adjustment. SDCL 11-2-61 provides:

Any person or persons, jointly or severally, aggrieved by any decision of the board of adjustment, or any taxpayer, or any officer, department, board, or bureau of the county, may present to a court of record a petition duly verified, setting forth that the decision is illegal, in whole or in part, specifying the grounds of the illegality. The petition shall be presented to the court within thirty days after the filing of the decision in the office of the board of adjustment.

Elliott alleged as part of his petition that the Commissioners’ denial of the building permit was unlawful. He alleged as follows:

Respondent [Commissioners]’ denial of Building Permit Application No. 4820 is unlawful in that it:
a. Failed to act on an appeal within a reasonable time as required by SDCL § 11-2-57;
b. Denied Building Permit Application No. 4820 for reasons unsupported by evidence, contrary to evidence presented, and otherwise acting arbitrarily and capriciously;
c. Denied Petitioner due process, equal protection of the laws, privileges and immunities, and other rights under the United States and South Dakota Constitutions, all under the color of state law, in violation of Petitioner’s civil rights;
d. Exceeded the scope of Respondents lawful power to act and was otherwise taken without proper authority under applicable law; and
e. Was otherwise unlawful under SDCL Title 11, Ch. 2 and SDCL Title 7, Ch. 8.

The “appeal” portion of Elliott’s pleading, entitled “Alternative Notice of Appeal,” asked for relief under SDCL 7-8-27 as an appeal from the board of county commissioners. That statute provides:

From all decisions of the board of county commissioners upon matters properly before it, there may be an appeal to the circuit court by any person aggrieved upon filing a bond in the amount of two hundred fifty dollars with one or more sureties to be approved by the county auditor conditioned that the appellant shall prosecute the appeal without delay and pay all costs that he may be adjudged to pay in the circuit court. Such bond shall be executed to the county and may be sued in the name of the county upon breach of any condition therein.

SDCL 7-8-27 (emphasis added). For reasons not obvious from the record, the court proceeded to consider the case under SDCL 7-8-27 and 7-8-30 as a direct appeal from a decision of the board of county commissioners. The trial court conducted a trial de novo and reviewed the Commissioners’ decision under an arbitrary and capricious standard.

[¶ 7.] Ultimately, the trial court affirmed the Commissioners’ decision. The trial court affirmed based in part on its determination that the amended zoning ordinances applied to Elliott’s application rather than the pre-amended ordinances. Under the amended ordinances, the facility would have required a conditional use permit. A conditional use permit required more and different criteria from those required for a building permit. Although the Commissioners conceded they had viewed the application as a building permit application under the pre-amended ordinances, the trial court proceeded to consider Elliott’s application as a conditional use. However, the trial court in the alternative, also affirmed the Commissioners’ decision under the building permit ordinances. The trial court summed up its decision as follows:

The Lake County Commission[ers’] decision to deny Elliott’s request for a building permit was not arbitrary or capricious, but was based upon evidence in the record. The ordinance that should have been applied was the ordinance adopted after the moratorium. However, Elliott was not entitled to the permit under the county ordinances existing at the time of his first application, at the time of his final plans submitted during the moratorium or at the time of the Commission[ers]’ decision. The County Commissioners] applied the pre-mora-torium ordinances, but its ultimate decision denying Elliott’s request for a building permit for a hog confinement unit was correct and is affirmed.

Elliott’s Issues on Appeal

[¶ 8.] Elliott claims on appeal to this Court that the essential legal issue is whether the County acted unlawfully in imposing additional conditions for a building permit beyond those specified by the Lake County Zoning Ordinances. Elliott claims (1) that his building permit application was complete and effective on August 31, 2001, (2) that the pre-amended ordinances and regulations apply to his application, (3) that the Commissioners lacked the discretion to deny his application, and (4) that the trial court erred in retroactively applying conditional use criteria. He argues that the Commissioners were bound by the zoning regulations in place at the time of Elliott’s application. He argues that the Zoning Officer, under Zoning regulation § 802.2, had authority to grant or deny a building permit but did not have discretion to delegate her authority. He argues that the Officer’s act was ministerial. He additionally argues that the Commissioners’ authority, if any, was strictly limited to reviewing his application for the purpose of determining whether the application complied with the standards set forth by Lake County Zoning Regulation § 802.2. He relies on our prior decisions for the proposition that the Commissioners lacked discretion to deny the application. See In re Conditional Use Permit Granted to Van Zanten, 1999 SD 79, ¶ 16, 598 N.W.2d 861, 865; Schrank v. Pennington County Bd. of Comm’rs, 1998 SD 108, ¶ 19, 584 N.W.2d 680, 683; Save Centennial Valley Ass’n., Inc. v. Schultz, 284 N.W.2d 452, 457 (S.D.1979). Neither the Zoning Officer nor the Commissioners, he argues, had discretion to consider factors not contained in the ordinance.

Lake County Zoning Ordinances

[¶ 9.] The Commissioners’ delegation of authority for administering and enforcing building permits is found in Article VIII, § 801 of the Lake County Comprehensive Zoning Regulations. The authority is delegated to the county zoning officer. Section 801 provides:

The provisions of this regulation shall be administered and enforced by a County Zoning Officer appointed by the Board of County Commissioners, who shall have the power to make inspection of building or premises necessary to carry out his duties in the enforcement of this regulation.

Section 802 then identifies the circumstances that require a building permit and describes the information that must be included in a building permit application. Section 802 also defines the authority of the Zoning Officer; it directs as follows:

If the proposed excavation or construction as set forth in the application are in conformity with the provisions of this regulation, and other regulations of the County then in force, the County Zoning Officer shall issue a building permit for such excavation or construction. If a building permit is refused, the County Zoning Officer shall state such refusal in writing, with the cause, and shall immediately thereupon mail notice of such refusal to the applicant at the address indicated upon the application. The County Zoning Officer shall grant or deny the permit within a reasonable time from the date the application is submitted.

Article VI of the Ordinances further specifies that “all questions of interpretation and enforcement shall be first presented to the County Zoning Officer.” Article VI also clearly provides that “such questions” only come “to the County Commission [] on appeal” from the zoning officer’s decision. Article VI is written as follows:

It is the intent of this regulation that all questions of interpretation and enforcement shall be first presented to the County Zoning Officer, and that such questions shall be presented to the County Commission only on appeal from the decision of the administrative official, and that recourse from the decision of the County Commission shall be to the courts as provided by law.

Zoning Appeal Rights and Procedures Under South Dakota Law

[¶ 10.] In 2000, the South Dakota Legislature made revisions to portions of the zoning laws codified in SDCL Chapter 11-2. As part of the revisions, the Legislature implemented major changes in the form and procedure of county zoning appeals. We recognized this new appellate scheme in relation to an appeal from a county board of adjustment in In re Yankton County Commission, 2003 SD 109, ¶¶ 17-18, 670 N.W.2d 34, 39-40. We said, “[w]e believe that the repeal of the prior statutes and the enactment of this new comprehensive appellate scheme expressed legislative intent to completely occupy the field of taking board of adjustment appeals.” Id. ¶ 18, 670 N.W.2d at 40.

[¶ 11.] Under the revised statutory scheme, an appeal from an administrative officer’s decision (for example, a zoning officer) advances to the county board of adjustment then directly into circuit court. SDCL 11-2-55 describes the appeal process from an administrative officer to the board of adjustment. It provides:

Appeals to the board of adjustment may be taken by any person aggrieved or by any officer, department, board, or bureau of the county affected by any decision of the administrative officer. The appeal shall be taken within a reasonable time, as provided by the rules of the board of adjustment, by filing with the officer from whom the appeal is taken and with the board of adjustment a notice of appeal specifying the grounds of the appeal. The officer from whom the appeal is taken shall transmit to the board of adjustment all the papers constituting the record upon which the action appealed from was taken.

Id. (emphasis added).

[¶ 12.] The law requires that the board of adjustment conduct a hearing on the appeal. SDCL 11-2-57. The board of adjustment has the authority to “reverse or affirm, wholly or partly, or may modify the order, requirement, decision, or determination appealed from and may make such order, requirement, decision, or determination as ought to be made, and to that end has all the powers of the officer from whom the appeal is taken.” SDCL 11-2-58. The law further specifies that an appeal from the board of adjustment is taken directly to circuit court. SDCL 11-2-61, 11-2-62; In re Yankton County Comm’n, 2003 SD 109, ¶¶ 17-18, 670 N.W.2d at 39-40. Lake County’s ordinances mirror the statutory appeal procedures.

[¶ 13.] A key element in the 2000 law change is that an appeal to circuit court must be in the form of a petition for a writ of certiorari. SDCL 11-2-62. The petition must be verified and “set[ ] ... forth that the decision [of the board of adjustment] is illegal, in whole or in part, specifying the grounds of the illegality.” SDCL 11-2-61. The statute provides:

Any person or persons, jointly or severally, aggrieved by any decision of the board of adjustment, or any taxpayer, or any officer, department, board, or bureau of the county, may present to a court of record a petition duly verified, setting forth that the decision is illegal, in whole or in part, specifying the grounds of the illegality. The petition shall be presented to the court within thirty days after the filing of the decision in the office of the board of adjustment.

Id.

Writ of Certiorari — Limited Court Review

[¶ 14.] Since the legislature specified that an appeal to circuit court must be in the form of a petition for a writ of certiorari, the court is limited in its review. The standard of review for a writ of certio-rari “cannot be extended further than to determine whether the ... board ... has regularly pursued the authority of such ... board.... ” SDCL 21-31-8. In applying this standard of. review to a board of adjustment decision, we have recently stated:

Our consideration of a matter presented on certiorari is limited to whether the board of adjustment' had ’ jurisdiction over the matter and whether it pursued in a regular manner the authority conferred upon it. A board’s actions will be sustained unless it did some act forbid- ' d'en by law or neglected to do some act required by law. Certiorari cannot be used to examine evidence for the purpose of determining the correctness of a finding....

Hines v. Board of Adjustment of City of Miller, 2004 SD 13, ¶ 10, 675 N.W.2d 231, 234 (internal quotations and citations omitted). This appellate procedure departs significantly from the trial de novo and arbitrary and capricious standard of review formerly applied to zoning appeals. See Coyote Flats, L.L.C. v. Sanborn County Comm’n, 1999 SD 87, ¶ 7, 596 N.W.2d 347, 349.

Applicable Law and Jurisdictional Questions

[¶ 15.] Against this backdrop, questions arise .concerning the trial court’s jurisdiction in this case. The right to appeal is a creature of statute set by the legislature. We have previously said:

The right to any appeal is statutory and established by the legislature. This court has consistently recognized that the right to an appeal is purely statutory and no appeal may be taken absent statutory authorization. An attempted appeal from which no appeal lies is a nullity and confers no jurisdiction on the court except to dismiss it.

Appeal of Lawrence County, 499 N.W.2d 626, 628 (S.D.1993) (internal citations omitted). We have also said that “[w]hen procedure is prescribed by the legislature for reviewing the action of an administrative body, review may be had only on compliance with such proper conditions as the legislature may have imposed.” Appeal of Heeren Trucking Co., 75 S.D. 329, 330-31, 64 N.W.2d 292, 293 (1954).

[¶ 16.] The legislature has clearly established in SDCL Chapter 11-2 the right of and procedure for appealing county zoning decisions. In this case, the trial court based jurisdiction and review on SDCL 7-8-27 and 7-8-30. We question whether the trial court had authority and jurisdiction under those statutes. Moreover, underlying the trial court’s jurisdictional authority are fundamental questions concerning the authority under which the Commissioners acted — that is, whether the Commissioners acted as the zoning officer, as a board of adjustment, or as a board of county commissioners. Which role the Commissioners assumed when they acted on Elliott’s application becomes significant in judging the legality of the action and the right to appeal. At least one Commissioner, in answer to a question, believed the Commissioners “[were] stepping into [the Zoning Officer’s] shoes.” If the Commissioners were acting as the Zoning Officer, they needed to establish their authority to do so. If the Commissioners acted as a board of adjustment, they only had the powers of a board of adjustment as set forth by SDCL 11-2-53. If they acted as a board of county commissioners, their authority is questionable. On the other hand, jurisdiction depends on the pleadings and prayer for relief. Thus, there may also be a question as to whether Elliott’s pleadings and actions sufficiently preserved his right of appeal or were sufficiently drafted to establish jurisdiction in circuit court.

[¶ 17.] Although jurisdictional questions were not raised below or on appeal, we have consistently held that questions of jurisdiction can be raised at any time and sua sponte by this Court. Pennington County v. State ex rel. Unified Judicial System, 2002 SD 31, ¶ 9, 641 N.W.2d 127, 130. “It is the rule in this state that jurisdiction must affirmatively appear from the record and this court is required sua sponte to take note of jurisdictional deficiencies, whether presented by the parties or not.” State v. Phipps, 406 N.W.2d 146, 148 (S.D.1987) (citation omitted); see also Decker ex rel. Decker v. Tschetter Hutterian Brethren, Inc., 1999 SD 62, ¶ 14, 594 N.W.2d 357, 362; Deno v. Oveson, 307 N.W.2d 862, 863 (S.D.1981). We have directed that “[t]he test for determining jurisdiction is ordinarily the nature of the case, as made by the complaint, and the relief sought.” Phipps, 406 N.W.2d at 148 (citation omitted).

Remand

[¶ 18.] Because we have raised a jurisdictional issue sua sponte on appeal, the parties have not had an opportunity to brief or to argue the issue; nor has the trial court had an opportunity to consider it in the first instance. For this reason, we remand the case to circuit court. On remand, the trial court must first determine whether it has jurisdiction. If so, the court should proceed to consider the appeal under the appropriate law and procedure. If not, the matter should be dismissed.

[¶ 19.] GILBERTSON, Chief Justice, and KONENKAMP and ZINTER, Justices, and MILLER, Retired Justice, concur.

[¶ 20.] MILLER, Retired Justice, sitting for SABERS, Justice, disqualified. 
      
      . Animal units are defined in the ordinance “as equivalent number of a species to equal 500, 1,000 and 2,000 animal units.” For example, 500 animal units of "Feeder or Slaughter Cattle” equal 500 head (an equivalent ratio of 1 to 1); 500 animal units of "Finisher Swine” (over 55 lbs) equal 1,250 head of inventory (an equivalent ratio of 0.4 to 1); 500 "Nursery Swine” (less than 55 lbs) equal 5,000 head (an equivalent ratio of 0.1 to 1); 500 animal units "Farrow-to-Finish (sows)” equal 135 head of inventory (an equivalent ratio of 3.7 to 1); 500 animal units "Swine Production Unit (Sows, Breeding, Gestating & Farrowing)" equal 1,064 head (an equivalent ratio of 0.47 to 1).
     
      
      . The record before us does not reflect whether Elliott challenged the Commissioners’ legal authority to issue a moratorium or to table his application for almost a year without action or whether he sought to compel the Zoning Officer to act. Paragraph 5 in his pleadings makes reference to another action concerning this matter. It states: "Petitioner appealed the failure of the Zoning Officer to act on the building permit, and commenced legal action in the Circuit Court for the Third Judicial Circuit, Case No. Civ. 01-159.”
     
      
      . The trial court on its own decided that the amended ordinances should apply to the application. On appeal to this Court, the parties briefed the issue of whether the trial court’s application of the amended ordinance was error. In light of our remand of this matter, we do not address this issue.
     
      
      . Under the statutes, the board of county commissioners is either required to appoint a board of adjustment, SDCL 11-2-49, or in lieu thereof "having adopted and in effect a zoning ordinance may act as and perform all the duties and exercise the powers of the board of adjustment.” SDCL 11-2-60. The relevant statutes provide:
      SDCL 11-2-49. Except as otherwise provided by § 11-2-60, the board shall provide for the appointment of a board of adjustment, or for the planning and zoning commission to act as a board of adjustment, and in the regulations and restrictions adopted pursuant to the authority of this chapter, shall provide that the board of adjustment may, in appropriate cases and subject to appropriate conditions and safeguards, grant variances to the terms of the ordinance.
      SDCL 11-2-60. In lieu of appointing the board of adjustment provided by § 11-2-49, the board of counly commissioners having adopted and in effect a zoning ordinance may act as and perform all the duties and exercise the powers of the board of adjustment. The chair of the board of county commissioners is chair of the board of adjustment as so composed. The concurring vote of at least two-thirds of the members of the board as so composed is necessary to reverse any order, requirement, decision, or determination of any administrative official, or to decide in favor of the appellant on any matter upon which it is required to pass under any zoning ordinance, or to effect any variation in the ordinance.
     
      
      . The law was amended both in 2003 and 2004. The 2004 version mirrors the version originally passed in 2000 and therefore is applicable to this case.
     
      
      . Section 501(1) of the ordinances provide that "[t]he County Commission shall act as the Board of Adjustment.” Section 502 sets forth the process of an appeal as follows:
      Appeals to the County commission may be taken by any person aggrieved or by an officer, department, board or bureau of the County of city/town, affected by any decision of the administrative officer. Such appeals shall be taken within a reasonable time, as provided by the rules of the County Commission by filing with the officer from whom the appeal is taken and with the County Commission a notice of appeal specifying the grounds thereof. The officer from whom the appeal is taken shall forthwith transmit to the county Commission all the papers constituting the record upon which the action appealed from was taken.
      Section 503 specifies the power of the board of adjustment as follows:
      Power and Jurisdiction Relating to Administrative Review. The County Board of Adjustment shall have the power to hear and decide appeals where it is alleged there is error in any order, requirement, decision or determination made by an administrative official or agency based on or made in the enforcement of any zoning regulation or any regulation relating to the location or structures or to interpret any map.
      Section 504 specifies that the power "to hear and decide” conditional use requests lies with the board of adjustment and outlines the procedure for submitting a request.
     
      
      . The law allows the board of county commissioners ”[i]n lieu of appointing the board of adjustment provided by § 11-2-49, ... [to] act as and perform all the duties and exercise the powers of the board of adjustment.” SDCL 11-2-60.
     