
    Dennis MARINICH and Lillian Marinich, Appellants, v. SPECIAL EDITION CUSTOM HOMES, LLC; Sandpiper Pools & Spas of Bradenton, LLC; and Gerald Michael Allora, Appellees.
    No. 2D07-4293.
    District Court of Appeal of Florida, Second District.
    Feb. 6, 2009.
    
      William A. Dooley of Dooley & Drake, P.A., Sarasota, for Appellants.
    Maria Tomassi, John S. Vento, and Gregg E. Hutt of Trenam, Kemker, Scharf, Barkin, Frye, O’Neill & Mullís, P.A., Tampa, for Appellee Special Edition Custom Homes, LLC.
    No appearance for Appellees Sandpiper Pools & Spas of Bradenton, LLC, and Gerald Michael Allora.
   STRINGER, Judge.

Dennis and Lillian Marinich (“the Mari-niches”) seek review of the trial court’s order granting Special Edition Custom Homes, LLC’s, (“Special Edition”) motion for summary judgment and entering judgment for Special Edition. We dismiss the appeal for lack of jurisdiction because an interrelated counterclaim remains pending below.

In the underlying action, the Mariniches sought a declaratory judgment regarding the legality of a contract for the construction of the Mariniches’ home (“the construction agreement”). The Mariniches asserted that because Special Edition did not have a qualifying agent, it was an unlicensed contractor who was precluded from enforcing the construction agreement under section 489.128(1), Florida Statutes (2005). Special Edition filed an answer and compulsory counterclaim to foreclose a construction lien on the Mariniches’ home based on the Mariniches’ failure to pay under the construction agreement. The Mariniches filed an answer and affirmative defense to the counterclaim asserting that the construction agreement was unenforceable for, among other things, the same reasons asserted in their declaratory judgment action.

The trial court subsequently granted Special Edition’s motion for summary judgment in the declaratory judgment action and entered partial final judgment on count I of the complaint finding that Special Edition did have a qualifying agent and was not unlicensed. The court therefore determined that the construction agreement was enforceable. The partial final judgment did not resolve Special Edition’s counterclaim for foreclosure, and that counterclaim remains pending in the trial court.

The Mariniches appealed the partial final judgment, and Special Edition filed a motion to dismiss arguing that this appeal should be dismissed for lack of jurisdiction because the partial final judgment is not final for purposes of appeal and there is no appellate rule providing for appeal of such a nonfinal order. This court denied the motion without prejudice to Special Edition’s right to raise the argument in its answer brief. Special Edition did indeed raise the jurisdictional argument in its answer brief. The Mariniches did not file a reply brief addressing this argument, but in their response to Special Edition’s motion to dismiss for lack of jurisdiction, the Mariniches argued that the partial final judgment is final because the counterclaim is a distinct and separate cause of action from the Mariniches’ declaratory judgment action.

“[P]iecemeal appeals should not be permitted where claims are legally interrelated and in substance involve the same transaction.” Mendez v. W. Flagler Family Ass’n, Inc., 303 So.2d 1, 5 (Fla. 1974). However, separate and distinct causes of action that are not interdependent on other pleaded claims may be appealed if dismissed with finality by the trial court. Id. “ ‘The test to determine whether counts of a multicount complaint are interrelated, so as to preclude a piecemeal appeal, is whether the counts arise from a set of common facts or a single transaction, not whether different legal theories or additional facts are involved in separate counts.’ ” Mass. Life Ins. Co. v. Crapo, 918 So.2d 393, 394 (Fla. 1st DCA 2006) (quoting Lemon v. Groninger, 708 So.2d 1025, 1027 (Fla. 5th DCA 1998)). Generally, the existence of a compulsory counterclaim will render a judgment on the original complaint nonfinal for appeal purposes. See Madura v. Turosienski, 901 So.2d 396, 397 (Fla. 2d DCA 2005); City of Haines City v. Allen, 509 So.2d 982, 983 (Fla. 2d DCA 1987).

The facts of this case are analogous to those in Stone v. Venetian Isles Homeowners Ass’n, Inc., 431 So.2d 623 (Fla. 2d DCA 1983), and Allen, 509 So.2d 982. In Stone, a homeowner’s association filed a suit against two homeowners to enforce restrictive covenants on the property. 431 So.2d at 623. The homeowners filed affirmative defenses challenging the validity of the restrictions. The homeowners also filed a counterclaim seeking to have the deed restrictions declared invalid on the same bases asserted in their affirmative defenses. The court dismissed the counterclaim with prejudice, and the homeowners filed a timely notice of appeal.

This court dismissed the appeal for lack of jurisdiction based on its determination that the counterclaim and underlying action were interrelated because “the viability of each depends upon whether or not the restrictions are valid.” Id. at 624. The court concluded, “The facts in this case especially call for a dismissal of this appeal because the grounds for the coun-terpetition are the same grounds as those of the affirmative defenses to the main claim.” Id.

In Allen, the city filed a declaratory judgment action seeking a declaration of whether it had sovereign immunity from any claims arising from an auto accident in which an on-duty city police officer was involved. 509 So.2d at 983. The defendants filed compulsory counterclaims for personal injury and wrongful death, and the city sought to raise the affirmative defense of sovereign immunity depending upon the outcome of its declaratory judgment action. The trial court granted the defendants’ motion for summary judgment on the declaratory judgment action, finding that the city was not protected from suit by sovereign immunity.

The city appealed, but this court dismissed the appeal for lack of jurisdiction. Id. at 984. This court explained that the declaratory judgment action and the counterclaim were inextricably intertwined because they arose from the same incident. The court noted that the ruling that the city did not have sovereign immunity did not conclude the litigation because the defendants’ claims for personal injury and wrongful death remained pending. See also Agriesti v. Clevetrust Realty Investors, 381 So.2d 753, 753-54 (Fla. 4th DCA 1980) (holding court lacked jurisdiction to hear appeal of order dismissing two counts of a multi-count counterclaim when underlying action to foreclose a mortgage and remainder of counterclaim remained pending and counterclaim sought to have mortgage declared unenforceable).

In this case, the Mariniches filed a declaratory judgment action to determine whether the construction agreement between them and Special Edition was enforceable because the Mariniches did not want to pay for the construction that Special Edition had completed. Special Edition’s counterclaim sought to foreclose a construction lien on the property that was the subject of the claim based on the Mari-niches’ failure to pay. Both the declaratory judgment action and the counterclaim arise from a set of common facts: the Mariniches’ refusal to pay Special Edition based on their assertion that the construction agreement is unenforceable by Special Edition because it is unlicensed. Furthermore, as in Stone and Allen, the grounds for the declaratory judgment action are the same grounds as those of the affirmative defenses to the companion cause of action. That is, Special Edition may not foreclose on the property pursuant to its counterclaim if the construction agreement is unenforceable, as the Mariniches contend in their declaratory judgment action and contended in their affirmative defenses to the counterclaim.

Because the claims in the pending counterclaim are legally interrelated and arise from the same transaction as the declaratory judgment claim, the partial summary judgment is not final for purposes of appeal. Accordingly, this appeal is dismissed for lack of jurisdiction.

Appeal dismissed.

WALLACE, J., and MORRIS, ROBERT JAMES, JR., Associate Judge, Concur. 
      
      . Counts II and III of the complaint were directed against Appellees Sandpiper Pools & Spas of Bradenton, LLC, and Gerald Michael Allora. Those counts are not at issue in this appeal.
     