In an action, inter alia, for a judgment declaring that a *496mortgage on certain real property is null and void, the defendants Deutsche Bank National Trust, Inc., as Trustee for unknown Mortgage Securitization Loan Trusts Series 1-12, Countrywide Bank N.A., Countrywide Home Loans, Inc., BAG Home Loans Servicing, L.P., Bank of America Corp., and Mortgage Electronic Registry System appeal (1) from so much of an order of the Supreme Court, Westchester County (O. Bellantoni, J.), entered July 14, 2011, as denied those branches of their motion which were, in effect, for a judgment declaring that the first mortgage on the real property is not null and void and pursuant to CPLR 3211 (a) (1) and (7) to dismiss the seventh cause of action insofar as asserted against them, and (2), as limited by their brief, from so much of an order of the same court entered December 22, 2011, as, upon reargument, adhered to the original determination.
Ordered that the appeal from the order entered July 14, 2011, is dismissed, as that order was superseded by the order entered December 22, 2011, made upon reargument; and it is further,
Ordered that the order entered December 22, 2011, is reversed insofar as appealed from, on the law, and, upon reargument, the determination in the order entered July 14, 2011, denying those branches of the appellants’ motion which were, in effect, for a judgment declaring that the first mortgage on the subject real property is not null and void and pursuant to CPLR 3211 (a) (1) and (7) to dismiss the seventh cause of action insofar as asserted against them is vacated, and those branches of the motion are granted, and the matter is remitted to the Supreme Court, Westchester County, for the entry of a judgment, inter alia, declaring that the first mortgage on the subject real property is not null and void; and it is further,
Ordered that one bill of costs is awarded to the appellants.
On March 26, 2004, the plaintiff, Andrew N. Benson, obtained a mortgage loan in the sum of $450,000 from the appellant Countrywide Home Loans, Inc. (hereinafter Countrywide), and gave a first mortgage on his property located in North Salem (hereinafter the premises) to Mortgage Electronic Registration Systems, Inc., sued herein as Mortgage Electronic Registry System (hereinafter MERS), as nominee for Countrywide (hereinafter the first mortgage). On February 21, 2007, the plaintiff obtained an additional mortgage loan in the sum of $325,105.23 from Countrywide, and gave a second mortgage on the premises to MERS, as nominee for Countrywide (hereinafter the second mortgage). On the same date, the plaintiff executed a Consolidation, Extension and Modification Agreement (hereinafter the CEMA), whereby the first mortgage and the second mortgage *497were consolidated into a single lien in the amount of $750,000, which was to be held by MERS, as nominee for Countrywide. Annexed as an exhibit to the CEMA was a consolidated note in the amount of $750,000, dated February 2, 2007. MERS, as Countrywide’s nominee, subsequently assigned the first mortgage to the appellant Deutsche Bank National Trust, Inc.
In March 2011, the plaintiff commenced the instant action, asserting seven causes of action. In the first cause of action, he sought a judgment declaring that the first mortgage is null and void, alleging, in effect, that the first mortgage was satisfied because it was assigned to a third party and that the execution of the CEMA rendered the first mortgage nonexistent. In the seventh cause of action, the plaintiff sought to quiet title to the premises, alleging, in effect, that when the first mortgage was sold to a third party, the appellants failed to deliver a certificate stating that the instrument had been satisfied, and that the first mortgage thus remained an “open item” clouding title. The appellants moved, in effect, for a judgment declaring that the first mortgage is not null and void, and, among other things, pursuant to CPLR 3211 (a) (1) and (7) to dismiss the second, third, fifth, sixth, and seventh causes of action insofar as asserted against them. The Supreme Court, inter alia, denied those branches of the appellants’ motion which were, in effect, for a judgment declaring that the first mortgage is not null and void and to dismiss seventh cause of action insofar as asserted against them. In an order entered December 22, 2011, the Supreme Court granted the appellants’ motion for leave to reargue those branches of their motion and, upon reargument, adhered to its original determination.
On a motion to dismiss a complaint pursuant to CPLR 3211 (a) (1), dismissal is warranted where “the documentary evidence utterly refutes [the] plaintiff’s factual allegations, conclusively establishing a defense as a matter of law” (Goshen v Mutual Life Ins. Co. of N.Y., 98 NY2d 314, 326 [2002]; see R.I. Is. House, LLC v North Town Phase II Houses, Inc., 51 AD3d 890, 893 [2008]). In considering a motion to dismiss for failure to state a cause of action pursuant CPLR 3211 (a) (7), the court is required to “accept the facts as alleged in the complaint as true, accord [the] plaintiffl ] the benefit of every possible favorable inference, and determine only whether the facts as alleged fit within any cognizable legal theory” (Leon v Martinez, 84 NY2d 83, 87-88 [1994]).
In the instant matter, the plaintiff increased the outstanding balance of the first mortgage by borrowing the second mortgage loan and executing the CEMA. Although the CEMA created a *498single mortgage lien, “[a] consolidation of outstanding loans is a device intended for the convenience of only the contracting parties” and “cannot impair liens in favor of parties that are not the contracting parties, which retain their independent force and effect” (Federal Deposit Ins. Corp. v Five Star Mgt., 258 AD2d 15, 22 [1999]). Where, as here, balances of first mortgage loans are increased with second mortgage loans and CEMAs are executed to consolidate the mortgages into single liens, the first notes and mortgages still exist and may be assigned to other lenders (see Aurora Loan Servs., LLC v Weisblum, 85 AD3d 95, 109 [2011]). Further, an assignment of a loan obligation means that the obligation has been transferred, not paid in full and, thus, contrary to the plaintiffs allegation, does not render the obligation satisfied and discharged.
Here, the documentary evidence conclusively established the continued validity of the first mortgage, dated March 26, 2004, and the allegations in the complaint failed to set forth the existence of a bona fide justiciable controversy as to whether title to the subject premises is wrongfully encumbered by the first mortgage (see CPLR 3211 [a] [1], [7]; Aurora Loan Servs., LLC v Weisblum, 85 AD3d at 109). Accordingly, upon reargument, the Supreme Court should have granted those branches of the appellants’ motion which were pursuant to CPLR 3211 (a) (1) and (7) to dismiss the seventh cause of action insofar as asserted against them.
Moreover, since the record before the Supreme Court was sufficient to resolve all issues of fact such that the rights of the parties can be determined as a matter of law (see Hoffman v City of Syracuse, 2 NY2d 484, 487 [1957]; Village of Woodbury v Brack, 99 AD3d 697, 700 [2012]; Matter of Tilcon N.Y., Inc. v Town of Poughkeepsie, 87 AD3d 1148, 1150 [2011]), upon reargument, the Supreme Court should have granted that branch of the appellants’ motion which was, in effect, for a judgment declaring that the first mortgage is not null and void.
Since this is, in part, a declaratory judgment action, we remit the matter to the Supreme Court, Westchester County, for the entry of a judgment, inter alia, declaring that the first mortgage is not null and void (see Lanza v Wagner, 11 NY2d 317, 334 [1962], appeal dismissed 371 US 74 [1962], cert denied 371 US 901 [1962]). Skelos, J.P, Dickerson, Austin and Cohen, JJ., concur.