NOTICE: This opinion is subject to motions for rehearing under Rule 22 as
well as formal revision before publication in the New Hampshire Reports.
Readers are requested to notify the Reporter, Supreme Court of New
Hampshire, One Charles Doe Drive, Concord, New Hampshire 03301, of any
editorial errors in order that corrections may be made before the opinion goes
to press. Errors may be reported by E-mail at the following address:
reporter@courts.state.nh.us. Opinions are available on the Internet by 9:00
a.m. on the morning of their release. The direct address of the court's home
page is: http://www.courts.state.nh.us/supreme.

                 THE SUPREME COURT OF NEW HAMPSHIRE

                           ___________________________


Cheshire
No. 2014-0702


                               MERRIAM FARM, INC.

                                         v.

                                TOWN OF SURRY

                            Argued: June 24, 2015
                      Opinion Issued: September 22, 2015

      Bernstein, Shur, Sawyer & Nelson, P.A., of Manchester (Roy W. Tilsley,
Jr. and Michael A. Klass on the brief, and Mr. Tilsley orally), for the petitioner.


      Bradley & Faulkner, P.C., of Keene (Gary J. Kinyon on the brief and
orally), for the respondent.

      CONBOY, J. The petitioner, Merriam Farm, Inc., appeals a decision of
the Superior Court (Kissinger, J.) dismissing its appeal of a decision of the
Zoning Board of Adjustment (ZBA) of the respondent, Town of Surry (Town), on
the basis that the appeal was barred by claim preclusion. We reverse and
remand.

       The trial court found, or the record supports, the following facts. The
petitioner owns an unimproved parcel of land in Surry with frontage on a Class
VI road. The property is approximately 1,000 feet from a Class V road. Under
the Town’s zoning ordinance, to build on its property, the petitioner must
establish that the property has at least 200 feet of frontage on a public street,
which is defined, in pertinent part, as a Class V or better road.

       In 2009, the petitioner applied to the Town’s selectboard, pursuant to
RSA 674:41 (2008), for a building permit to construct a single-family home on
the property. The selectboard denied the application because the property
lacked frontage on a Class V or better road. See RSA 674:41, I. The petitioner
appealed to the ZBA, and the ZBA denied relief. Subsequent appeals by the
petitioner to the trial court and to this court were also unsuccessful. See
Merriam Farm, Inc. v. Town of Surry, No. 2011-0311 (N.H. Sept. 12, 2012).

       In 2013, the petitioner applied to the ZBA for a variance from the
frontage requirement in the Town’s zoning ordinance in order to build a single-
family residence on the property. See RSA 674:33, I(b) (Supp. 2014). The ZBA
denied the application. After unsuccessfully moving for rehearing, the
petitioner appealed to the trial court.

       The Town asserted, among other arguments, that the petitioner’s
application for a variance was barred by the doctrines of claim preclusion and
preemption. The petitioner argued, among other things, that the Town waived
its claim preclusion argument and that the ZBA improperly applied the
statutory criteria governing variances under RSA 674:33, I(b).

       Following a hearing, the trial court issued an order in which it
determined that the Town did not waive its claim preclusion argument. The
court then decided that the petitioner’s previously unsuccessful application for
a building permit under RSA 674:41 precluded the ZBA from considering the
petitioner’s variance application. This appeal followed.

       Judicial review in zoning cases is limited. Brandt Dev. Co. of N.H. v. City
of Somersworth, 162 N.H. 553, 555 (2011). Factual findings of the ZBA are
deemed prima facie lawful and reasonable, and the ZBA’s decision will not be
set aside by the superior court absent errors of law unless it is persuaded by
the balance of probabilities, on the evidence before it, that the ZBA decision is
unlawful or unreasonable. RSA 677:6 (2008); Brandt Dev. Co. of N.H., 162
N.H. at 555. We will uphold the superior court’s decision unless the evidence
does not support it or it is legally erroneous. Brandt Dev. Co. of N.H., 162 N.H.
at 555. The interpretation and application of a statute or ordinance is a
question of law, and we review the trial court’s ruling on such issues de novo.
Id.

       The petitioner first argues that the Town waived its right to raise the
issue of claim preclusion because it failed to raise the issue in a motion for
rehearing before the ZBA. See RSA 677:3, I (2008). The petitioner also argues
that, “[e]ven if the Town did not waive its right to raise the issue of preclusion,


                                         2
the [p]etitioner’s application for a variance . . . is not precluded by its prior
application for relief filed under RSA 67[4]:41.” Because we agree that claim
preclusion does not bar the petitioner’s variance application, we need not
address whether the Town waived its right to raise the claim preclusion issue.

       To determine whether the doctrine of claim preclusion, otherwise known
as res judicata, applies here, we employ the familiar three-part test. See In re
Estate of Bergquist, 166 N.H. 531, 535 (2014); Gray v. Kelly, 161 N.H. 160, 164
(2010). This doctrine prevents parties from relitigating matters actually
litigated and matters that could have been litigated in the first action, and it
applies if three elements are met: “(1) the parties are the same or in privity
with one another; (2) the same cause of action was before the court in both
instances; and (3) the first action ended with a final judgment on the merits.”
Bergquist, 166 N.H. at 534-35 (quotation omitted). “The applicability of res
judicata is a question of law, which we review de novo.” Id. at 535 (quotation
omitted).

     The parties agree that the first and third elements of the res judicata test
are met and dispute only whether the second element is met. Accordingly, we
must determine only whether the petitioner’s variance appeal constitutes the
same cause of action as its prior building permit appeal.

        The term “cause of action” is defined as the right to recover, regardless of
the theory of recovery. Meier v. Town of Littleton, 154 N.H. 340, 343 (2006)
(quotation omitted); see Sleeper v. Hoban Family P’ship, 157 N.H. 530, 534
(2008) (defining “cause of action collectively to refer to all theories on which
relief could be claimed on the basis of the factual transaction in question”
(quotation omitted)). “Generally, in determining whether two actions are the
same cause of action for the purpose of applying res judicata, we consider
whether the alleged causes of action arise out of the same transaction or
occurrence.” Sleeper, 157 N.H. at 534 (quotation and brackets omitted). Res
judicata will bar a second action even though the petitioner is prepared in the
second action to present evidence or grounds or theories of the case not
presented in the first action. Id.

      To support its argument that res judicata precludes the petitioner’s
claim, the Town relies upon our decision in Shepherd v. Town of
Westmoreland, 130 N.H. 542 (1988). In Shepherd, the plaintiff appealed the
zoning board’s denial of a variance, and the superior court upheld that
decision. Shepherd, 130 N.H. at 543. The plaintiff did not appeal the ruling of
the superior court, but later filed a petition for declaratory judgment, raising
constitutional and inverse condemnation claims. Id. On appeal, we agreed
with the town that, because the plaintiff failed to litigate her other claims on
appeal of the denial of her variance request, res judicata precluded the plaintiff
from raising those claims in the declaratory judgment action. See id. at 544.
We explained that the plaintiff’s constitutional and inverse condemnation


                                         3
claims and her prior variance request were the same cause of action for res
judicata purposes because they arose out of the same factual transaction. Id.
Because the plaintiff simply attached a new label to her cause of action in the
subsequent action, we concluded that res judicata barred the subsequent
action. Id.

      Unlike the constitutional and inverse condemnation claims in Shepherd
that could, and should, have been brought when the plaintiff appealed the
zoning board’s denial of her variance, see id. at 544-45, the petitioner here
could not have added the variance claim to its appeal of the ZBA’s denial of its
building permit application.

       To obtain a building permit, the petitioner needed to demonstrate
compliance with RSA 674:41. RSA 674:41 generally requires a showing that
the lot upon which a building is proposed to be built has frontage on a Class V
or better highway. See RSA 674:41, I(a). However, RSA 674:41 also allows for
a building permit to be issued in other circumstances. For instance, the
statute provides that a building permit may be issued when property has
frontage on a Class VI highway if certain conditions are met. See RSA 674:41,
I(c). The statute also establishes exceptions to its various requirements,
including allowing for an appeal from the decision of the administrative officer
to the ZBA whenever enforcement of the statute’s provisions “would entail
practical difficulty or unnecessary hardship” and permitting the ZBA to make a
“reasonable exception” for the applicant. RSA 674:41, II.

       In its prior appeal, the petitioner sought a “reasonable exception”
pursuant to RSA 674:41, II. Thus, the petitioner was required to demonstrate
that enforcement of the provisions in RSA 674:41 would have entailed
“practical difficulty or unnecessary hardship.” See RSA 674:41, II. It did not,
however, also need to demonstrate, at that time, that it met all of the statutory
requirements for a variance. In contrast to the plaintiff in Shepherd, who
should have brought her constitutional and inverse condemnation claims when
she appealed to the trial court, the petitioner could not have included variance
issues in its trial court appeal of the ZBA’s denial of its building permit
application. This is so because the ZBA, as opposed to the trial court, decides
in the first instance whether to issue a variance. See RSA 674:33 (Supp.
2014); see also Chester Rod & Gun Club v. Town of Chester, 152 N.H. 577,
583-84 (2005) (remanding to ZBA to determine, in first instance, whether
requirements necessary for grant of variance were met and determining that
trial court erred, in part, by ordering ZBA to grant variance where ZBA had
made no findings as to certain variance requirements). Accordingly, the
petitioner needed to bring its variance application before the ZBA in an action
separate from its appeal to the trial court of the denial of its building permit
application. Under such circumstances, res judicata is inapplicable to the
petitioner’s variance application.



                                        4
       If, based upon res judicata, we were to bar a subsequent application for a
variance after the denial of a building permit application, we would, as the
petitioner notes, effectively require landowners to simultaneously apply for all
potentially necessary land use permits, variances, and exceptions. Such would
be costly and inefficient, and burden the zoning process by adding complexity
to an already complicated process. See Bartlett v. City of Manchester, 164 N.H.
634, 641 (2013) (recognizing the “complexity of zoning regulation”). Moreover,
such a decision would contravene the statutory scheme, which explicitly
establishes separate procedures for seeking exceptions to building permit
requirements and seeking variances. See RSA 674:41, II (permitting ZBA to
make a “reasonable exception” to building permit requirements when
enforcement of statutory provisions “would entail practical difficulty or
unnecessary hardship”); RSA 674:33, I(b) (allowing ZBA to authorize variances
upon appeal if specific statutory requirements are satisfied). Nothing in the
statutory scheme requires contemporaneous initiation, or consolidation, of
these procedures.

       Accordingly, we conclude that the denial of the petitioner’s application
for a building permit gave rise to a cause of action different from the denial of
its variance application, and, thus, res judicata did not preclude the
petitioner’s variance application. Therefore, we reverse the trial court’s ruling.

       To the extent that the Town additionally suggests that our decision in
Brandt applies because the petitioner filed successive variance applications, we
disagree. See Brandt Dev. Co. of N.H., 162 N.H. at 556. Here, the petitioner
filed only one variance application.

        The Town further argues that the doctrine of preemption precludes the
petitioner from seeking a variance and contends that the ZBA properly denied
the petitioner’s variance application on the merits. However, because the trial
court did not address these issues after it concluded that the case could be
resolved based upon claim preclusion, we decline to address these issues in the
first instance, and accordingly remand them to the trial court.

                                                   Reversed and remanded.

      DALIANIS, C.J., and HICKS, LYNN, and BASSETT, JJ., concurred.




                                         5
