
250 P.3d 1035 (2011)
2011 UT App 90
BAC HOME LOAN SERVICING, INC., Plaintiff and Appellee,
v.
Kevin R. STEPHENS and Sherrie A. Stephens, Defendants and Appellants.
No. 20110065-CA.
Court of Appeals of Utah.
March 24, 2011.
Brian Arnold and Matt Wadsworth, South Ogden, for Appellants.
Jeffrey J. Steele and Justin R. Baer, Salt Lake City, for Appellee.
Before Judges DAVIS, VOROS, and ROTH.

DECISION
PER CURIAM:
¶ 1 Appellants Kevin R. Stephens and Sherrie A. Stephens appeal an order dismissing their counterclaims. This case is before the court on a sua sponte motion for summary dismissal for lack of jurisdiction on the basis that the order is not final and appealable.
¶ 2 Rule 3(a) of the Utah Rules of Appellate Procedure states that "[a]n appeal may be taken from a district . . . court to the appellate court with jurisdiction over the appeal from all final orders and judgments." Utah R.App. P. 3(a). An appeal taken from an order that is not final must be dismissed for lack of appellate jurisdiction. See Bradbury v. Valencia, 2000 UT 50, ¶ 8, 5 P.3d 649. An order is final and appealable when it disposes of all of the claims against all parties on the merits. See id. ¶ 9; see also Loffredo v. Holt, 2001 UT 97, ¶ 12, 37 P.3d 1070; Houston v. Intermountain Health Care, 933 P.2d 403, 406 (Utah Ct.App.1997) ("Generally, a judgment is not a final, appealable order if it does not dispose of all the claims in a case, including counterclaims.").
¶ 3 Appellee BAC Home Loans Servicing (BAC) initiated the underlying action by filing an unlawful detainer complaint against the Stephenses to gain possession of a property that BAC had purchased at a trustee's sale. The Stephenses answered and filed a number of counterclaims. On December 22, 2010, the district court entered an order granting BAC's motion to dismiss the counterclaims. The Stephenses filed a notice of appeal from that order. BAC's unlawful detainer complaint remains pending in the district court where BAC has filed a motion for summary judgment and a request for costs and fees, both of which are now before the district court.
¶ 4 The order that the Stephenses seek to appeal is not final and appealable because it does not wholly dispose of the case pending in the district court. In addition, the Stephenses have neither sought nor obtained certification of the order dismissing their counterclaims as final for purposes of appeal pursuant to rule 54(b) of the Utah Rules of Civil Procedure, see Utah R.App. P. 54(b), and they did not seek or obtain permission to pursue an interlocutory appeal pursuant to rule 5 of the Utah Rules of Appellate Procedure, see id. 5.
¶ 5 Once a court has determined that it lacks jurisdiction, it "retains only the authority to dismiss the action." Varian-Eimac, Inc. v. Lamoreaux, 767 P.2d 569, 570 (Utah Ct.App.1989). Accordingly, we dismiss the appeal for lack of jurisdiction, without prejudice to a timely appeal following the entry of a final appealable judgment.
