
    CENTRA HOMES, LLC, et al., Respondents, v. CITY OF NORWOOD YOUNG AMERICA, Minnesota, Appellant.
    No. A12-2287.
    Court of Appeals of Minnesota.
    July 29, 2013.
    
      Joseph Gerald Springer, Joseph John Cassioppi, Fredrikson <& Byron, P.A., Minneapolis, MN, for respondents.
    Katherine Marie Swenson, Greene Espel PLLP, Minneapolis, MN, for appellant.
    Considered and decided by PETERSON, Presiding Judge; CHUTICH, Judge; and SMITH, Judge.
   OPINION

PETERSON, Judge.

This appeal is from a district court order that denied appellant city’s motion to dismiss for lack of subject-matter jurisdiction respondents’ lawsuit challenging the city’s building-permit fees. The city argues that (1) because each of respondents’ claims addresses the application and interpretation of the state building code, and an administrative process is available to address these matters, the district court erred in ruling that respondents did not need to exhaust administrative remedies before seeking judicial review; and (2) the municipal planning act does not apply to this case. We reverse.

FACTS

Respondent Centra Homes, LLC, applied to appellant City of Norwood Young America for building permits to build two homes. The city has adopted the Minnesota State Building Code, and its building-permit fee schedule is based on permit valuations. City of Norwood Young America, Minn., Code of Ordinances (N.Y.A) §§ 2000.01-02, Schedule A (2012). To determine permit valuations, the city uses a valuation table provided by Metro West Inspection Services, Inc., a company that provides inspection services for about 20 municipalities.

Because the city had previously set permit valuations significantly higher than Centra’s estimated permit valuations and the actual costs of permit-related work on homes that Centra built, Centra submitted an estimated permit valuation of $110,000 for the, first home, even though it believed that its actual costs would be about $81,000. For the second home, Centra submitted an estimated permit valuation of $101,424. Using the Metro West valuation table, the city set a permit valuation of $146,000 for the first home and $189,544 for the second home.

Centra asserted to city staff and officials that the city’s permit fees violated state law because they were not related to actual costs. When the city declined to reduce its permit fees, Centra contacted the city attorney about whether there were administrative remedies for Centra to pursue before bringing a lawsuit. The city attorney responded that he would review the city ordinances to determine whether they provided for an administrative appeal. More than one month later, the city sent an email to Centra stating that it had reviewed Centra’s claims with the Minnesota League of Cities and would “accept payment in escrow for the building permit fees, based on Minn.Stat. § 462.353.”

Centra and the city entered into an escrow agreement under Minn.Stat. § 462.353, subd. 4(d) (2012). The agreement permitted Centra to file an appeal to the district court under Minn.Stat. § 462.361 (2012), to challenge the city’s permit valuations for the two homes. Cen-tra and respondents Builders Association of the Twin Cities (BATC) and Builders Association of Minnesota (BAM) then began this lawsuit, alleging that the city’s building-permit fees are not based on the total value of all construction work for which the permit is issued, as required under Minn. R. 1300.0160, subp. 3 (2011). Centra challenged the permit valuations and permit fees for the two homes, and all three respondents sought a declaratory judgment that the city’s use of the Metro West valuation table to determine permit valuations “has resulted in permit valuations that are not reasonably based on the total value of all construction work for which' the permits -jyere issued” and the city is required to set permit valuations based on the total value of construction work. Respondents also sought a writ of mandamus and an injunction requiring the city “to set permit valuations reasonably based on the total value of all construction work for which the permits are issued and to refund to Centra all overcharged fees for the [two properties].”

The city moved to dismiss the complaint for lack of subject-matter jurisdiction, arguing that Centra’s appeal from the permit valuations was an appeal of a “decision” made by a “building official relative to the application and interpretation of [the building] code” under Minn. R. 1300.0230, subp. 1 (2011). The city asserted that Centra should have challenged the permit valuations by filing an administrative appeal with the state appeals board instead of filing a district court action. The district court denied the city’s motion based on its determinations that it had subject-matter jurisdiction over the claims for declaratory, mandamus, and injunctive relief; respondents’ claims challenged the city’s actions under both the building code and Minnesota statutes, and the court was “not persuaded that these claims are merely challenges to code interpretation/application”; and it would not serve the interests of judicial economy to dismiss the action.

This appeal followed. This court questioned jurisdiction. Respondents argued that this is an improper interlocutory appeal because the city’s motion to dismiss was based on the exhaustion of remedies, which is a potential defense that does not involve subject-matter jurisdiction. The city argued that the district court’s order denying its motion to dismiss was based on subject-matter jurisdiction, and, therefore, the order is immediately appealable. This court accepted jurisdiction provisionally and referred to the panel deciding the case on the merits the issue of whether the district court order denying the city’s motion to dismiss was based on subject-matter jurisdiction.

ISSUES

1. Is the district court order denying the city’s motion to dismiss for lack of subject-matter jurisdiction appealable?

2. Did the district court have subject-matter jurisdiction over respondents’ claims that the city’s building-permit fees are not reasonably based on the total value of all construction work for which the permits were issued?

ANALYSIS

Is the district court order appealable?

An order denying a motion to dismiss for lack of jurisdiction is appealable as a matter of right, as it is not merely retention of the action for trial, but a determination compelling the defendant to take on the burden of litigation that it has a legal right to avoid.

Janssen v. Best & Flanagan, LLP, 704 N.W.2d 759, 763 (Minn.2005).

Respondents argue that even if the city’s motion to dismiss Centra’s statutory claim under Minn.Stat. § 462.361 raised an issue regarding subject-matter jurisdiction, the city’s interlocutory appeal is improper because the city’s motion did not address the fact that respondents asserted claims for declaratory, mandamus, and in-junctive relief regarding the city’s use of the Metro West valuation tables to set permit valuations. But if the district court’s order denying the motion to dismiss was based, at least in part, on the court’s rejection of jurisdictional grounds for dismissal, the order is immediately ap-pealable. Id.

The city moved to dismiss respondent’s action because administrative remedies were available for challenging the city’s building-permit valuations and respondents did not exhaust those administrative remedies before bringing their action in district court. The city argued that, regardless of whether Minn.Stat. § 462.361 applied, the district court did not have subject-matter jurisdiction because respondents had not exhausted their administrative remedies. The district court acknowledged that a party aggrieved by an ordinance, rule, regulation, decision, or order of a governing body may bring an action under Minn.Stat. § 462.361 to have the grievance reviewed in district court, provided the aggrieved party has exhausted its administrative remedies as required under Minn.Stat. § 462.361, subd. 2. But the district court denied the city’s motion because it concluded that under an exception stated in Minn.Stat. § 462.361, subd. 2, respondents were not required to exhaust their administrative remedies before bringing their action in district court.

Because the district court’s denial of the city’s motion to dismiss was based, in part, on its rejection of the city’s claimed jurisdictional ground for dismissal, the district court’s order is appealable.

Did the district court have subject-matter jurisdiction?

Whether subject-matter jurisdiction exists is a question of law, which is reviewed de novo. Nw. Airlines, Inc. v. Metro. Airports Comm’n, 672 N.W.2d 379, 381 (Minn.App.2003), review denied (Minn. Feb. 24, 2004).

Courts generally require that before judicial review of administrative proceedings will be permitted, the appropriate channels of administrative appeal must be followed. Courts require exhaustion of administrative remedies to protect the autonomy of administrative agencies and to promote judicial efficiency. The record produced during the administrative process facilitates judicial review and may also reduce the need to resort to judicial review. But, exhaustion of administrative remedies need not be pursued if it would be futile to do so.

Id. at 381-82 (citations omitted). A claim of failure to exhaust administrative remedies may raise an issue of subject-matter jurisdiction. See id. at 381-82, 385 (analyzing failure-to-exhaust-administrative-remedies claim as issue of subject-matter jurisdiction and holding that district court properly dismissed action for lack of subject-matter jurisdiction when party failed to exhaust administrative remedies).

Respondents argue that the doctrine of exhaustion of administrative remedies does not apply to this case because Minn.Stat. § 462.361, subds. 1, 2, which are parts of the municipal planning act, create a different procedural standard for actions brought under that section. Respondents contend that section 462.361, subdivision 1, “confers jurisdiction on district courts to decide any disputes arising under that Section without a requirement that litigants first exhaust administrative remedies.” But respondents’ argument assumes that respondents properly brought an action in district court under section 462.361 to challenge the city’s building-permit fees. This assumption is incorrect.

Minn.Stat. § 462.361, subd. 1, states:

Any person aggrieved by an ordinance, rule, regulation, decision or order of a governing body or board of adjustments and appeals acting pursuant to sections 462.351 to 462.364 may have such ordinance, rule, regulation, decision or order, reviewed by an appropriate remedy in the district court, subject to the provisions of this section.

Respondents contend that, under this subdivision, they may bring an action in district court because they have asserted claims under Minn.Stat. § 462.353, which is within the range of statutory sections cited in this subdivision. But we are not persuaded that respondents’ claims can be asserted under Minn.Stat. § 462.353.

Minn.Stat. § 462.353, subd. 4(a), states:

A municipality may prescribe fees sufficient to defray the costs incurred by it in reviewing, investigating, and administering an application for an amendment to an official control established pursuant to sections 462.351 to 462.364 or an application for a permit or other approval required under an official control established pursuant to those sections. Except as provided in subdivision 4a, fees as prescribed must be by ordinance. Fees must be fair, reasonable, and proportionate and have a nexus to the actual cost of the service for which the fee is imposed.

(Emphasis added.)

Under the plain meaning of the emphasized language, this paragraph applies to a building-permit application only if a building permit is required under an official control established pursuant to sections 462.351 to 462.364 (2012). Respondents correctly note that the definition of “official controls” under Minn.Stat. § 462.352, subd. 15, includes building codes, but respondents have not shown that the city established either a building code or building-permit fees pursuant to any provision of sections 462.351 to 462.364. And our review of those sections has not revealed any provision that authorizes a municipality to establish a building code or a building-permit fee.

Sections 462.351 to 462.364, which the parties have referred to as the municipal planning act, govern municipal land-use regulation. See Minn.Stat. § 462.351 (stating that municipal planning act’s purpose is to guide “future development of land”), .353, subd. 1 (granting authority to conduct “comprehensive municipal planning activities for guiding the future development and improvement of the municipality”), .357, subd. 1 (granting zoning authority), .358, subd. la (granting authority for subdivision regulation); Nordmarken v. City of Richfield, 641 N.W.2d 343, 347-48 (Minn.App.2002) (overview of municipal planning act), review denied (Minn. June 18, 2002). The municipal planning act does not govern building construction.

“The State Building Code governs the construction, reconstruction, alteration, and repair of buildings and other structures to which the code is applicable.” Minn.Stat. § 326B.101 (2012). The city adopted the state building code pursuant to Minn.Stat. § 16B.62 (recodified at Minn. Stat. § 326B.121 (2012)), not pursuant to sections 462.351 to 462.364. Consequently, the city’s building-permit fees are not fees to defray the costs incurred by the city in reviewing, investigating, and administering an application for a permit required under an official control established pursuant to sections 462.351 to 462.364, and a person required to pay a building-permit fee is not aggrieved by a decision of the city acting pursuant to sections 462.351 to 462.364. Cf. Neitzel v. Cnty. of Redwood, 521 N.W.2d 73, 75 (Minn.App.1994) (stating that county board was not acting pursuant to section 462.361 when it denied conditional-use permit because conditional-use permits are governed by section 394.301), review denied (Minn. Oct. 27, 1994). Therefore, Minn.Stat. § 462.361, subd. 1, does not permit respondents to bring an action in district court to obtain review of the city’s building-permit fees.

Respondents argue that the city’s assertion that respondents have not stated valid claims under the municipal planning act is waived because the city did not raise this argument in the district court. But a lack of subject-matter jurisdiction may be raised at any time, even for the first time on appeal. Witzke v. Mesabi Rehab. Servs., Inc., 768 N.W.2d 127, 129 (Minn.App.2009). Respondents also argue that a finding of waiver is particularly appropriate because the city entered into an escrow agreement with Centra under Minn.Stat. § 462.353, subd. 4(d), “which specifically provided that Centra would be filing a claim in the district court under the Municipal Planning Act to challenge the City’s permit valuations.” But parties cannot confer subject-matter jurisdiction on the district court by agreement. No Power Line, Inc. v. Minn. Envtl. Quality Council, 262 N.W.2d 312, 321 (Minn.1977); see also Fryberger v. Twp. of Fredenberg, 428 N.W.2d 601, 604 (Minn.App.1988) (rejecting argument that township should be estopped from claiming that its board of adjustment lacked authority to review decision of township’s planning commission when township’s board of supervisors advised appellants to appeal to board of adjustment).

Respondents argue that because Minn. Stat. § 462.353, subd. 4(a), is the only statutory authority for a municipality to charge building-permit fees, the city’s building-permit fees are either authorized by section 462.353, subdivision 4(a), or they are not authorized at all. But the legislature directed the commissioner of labor and industry to establish a building code by rule and to include in the code “duties and responsibilities for code administration.” Minn.Stat. § 326B.106, subd. 1 (2012). Pursuant to this statutory authority, Minn. R. 1300.0160 (2011) was enacted and, among other things, this rule provides that a building-permit applicant “shall pay the fee set forth by a fee schedule adopted by the municipality,” “[flees established by the municipality must be by legal means and must be fair, reasonable, and proportionate to the actual cost of the service for which the fee is imposed,” and “[a] permit shall not be issued until the fees prescribed by the municipality have been paid.” Minn. R. 1300.0160, subps. 1, 2, 7. Although this rule does not directly state that municipalities are authorized to charge building-permit fees, it plainly requires municipalities to adopt and use permit-fee schedules.

The rules applicable to the state building code provide that a permit applicant may appeal a municipal building official’s decision to a municipal board of appeals or to the state appeals board:

In order to hear and decide appeals of orders, decisions, or determinations made by the building official relative to the application and interpretation of this code, there shall be and is hereby created a board of appeals....
... For jurisdictions without a board of appeals, the appellant may appeal to an appeals board assembled by the state of Minnesota, Department of Labor and Industry’s Construction Codes and Licensing division.

Minn. R. 1300.0230, subp. 1. A decision of a municipal board of appeals or the state appeals board may be appealed to the commissioner of the department of labor and industry and heard as a contested case under the Administrative Procedure Act. Minn.Stat. § 326B.139 (2012). A contested-case decision may be appealed by writ of certiorari to this court. Minn.Stat. § 14.63 (2012).

Each of respondents’ claims in this action is based on the validity or invalidity of the permit valuations set by the city, which are determinations made by the city building official relative to the application and interpretation of the state building code. Respondents argue that, at least, the district court has subject-matter jurisdiction over BAM’s and BATC’s claims for declaratory, mandamus, and injunctive relief on behalf of their members and similarly situated contractors. Respondents cite Builders Ass’n of Minn. v. City of St Paul, 819 N.W.2d 172, 177-78 (Minn.App.2012), in which this court held that BAM was not required to exhaust administrative remedies and was entitled to bring a declaratory-judgment claim. But Builders Ass’n is distinguishable from this ease in that Builders Ass’n involved the interplay among the state building code, a municipal policy, and the state fire code. This court stated in Builders Ass’n:

Here, ... the dispute does not primarily concern the administration or enforcement of the state building code. Rather, it centers on whether the egress-window provisions of the state building code “trump” broader provisions in the state fire code and, if so, whether the state building code also preempts the city’s egress-window policy. Although these questions require interpreting the state building code, they also necessitate interpreting the city’s policy and the state fire code, neither of which fall within the commissioner’s interpretative authority. Thus, no adequate administrative remedies were available for BAM to pursue. To the extent the district court determined that BAM failed to exhaust available administrative remedies, it erred as a matter of law.

Id. Cf. Nw. Airlines, 672 N.W.2d at 383-84 (upholding dismissal of declaratory-judgment claim for lack of subject-matter jurisdiction when plaintiff challenged ordinance setting forth rate structure for fees charged to airports and plaintiff sought a rate change for fees charged to it and other airports). Because this action involves only determinations made by a municipal building official relative to the application and interpretation of the state building code, Builders Ass’n does not apply-

DECISION

Because the city’s building-permit fees are determinations made by the city building official relative to the application and interpretation of the state building code, respondents were required to exhaust their administrative remedies before seeking judicial review, and the district court erred in denying the city’s motion to dismiss for lack of subject-matter jurisdiction.

Reversed. 
      
      . The exception in subdivision 4a is not relevant to our analysis in this opinion.
     