Order, Supreme Court, New York County (Eileen Bransten, J.), entered November 6, 2009, which granted defendant’s motion to dismiss the action pursuant to CPLR 3211 (a) (4) to the extent of staying the action pending the resolution of the parties’ Pennsylvania action, and denied as moot plaintiffs cross motion for summary judgment, unanimously affirmed, with costs.
The determination to stay this action pending the resolution of the Pennsylvania action was a provident exercise of discretion (see Whitney v Whitney, 57 NY2d 731 [1982]; White Light Prods. v On The Scene Prods., 231 AD2d 90, 99 [1997]). The record establishes that there is a substantial identity of the parties and claims in the two actions and the Pennsylvania action will necessarily resolve the sole cause of action asserted in this action. Moreover, the Pennsylvania action is more comprehensive, was commenced reasonably close in time to this one and “offers more” than this action because it includes plaintiffs affiliates as parties and will address defendant’s claims (see *496Continental Ins. Co. v Polaris Indus. Partners, 199 AD2d 222, 223 [1993]).
The court also properly considered that this dispute has a significant nexus with Pennsylvania since most of the subject “synfuel” plants were located in Pennsylvania, defendant performed its services in Pennsylvania, where it is headquartered, and numerous meetings relating to the parties’ agree-. ment took place in Pennsylvania (see White Light Prods., 231 AD2d at 99).
Although this action was filed first, chronology is not dispositive, “particularly where both actions are at the earliest stages of litigation” (San Ysidro Corp. v Robinow, 1 AD3d 185, 186 [2003]). “[T]he practice of determining priorities between pending actions on the basis of dates of filing is a general rule, not to be applied in a mechanical way, regardless of other considerations” (White Light Prods., 231 AD2d at 97 [internal quotation marks and citations omitted]).
The motion court also reasonably concluded that plaintiff commenced this action preemptively while aware that defendant would commence litigation if the parties failed to reach an agreement. The record shows that plaintiff commenced this action on the same day that the parties finally discussed settlement, after plaintiff had spent months avoiding defendant’s requests for pertinent financial information and for an adjustment to its compensation, which indicates that plaintiff filed this case in an attempt to deprive defendant of its choice of forum and to gain a tactical advantage. ,“[T]he format of [this] suit, a declaratory action, [also] strongly suggests that it was responsive to [a] threat of litigation” (L-3 Communications Corp. v SafeNet, Inc., 45 AD3d 1, 9 [2007]).
The parties’ consulting agreement contained a New York choice of law clause and a forum selection clause providing New ' York courts with nonexclusive jurisdiction to settle disputes. Plaintiff contends that, pursuant to General Obligations Law § 5-1402, the trial court had to enforce the forum selection clause and exercise jurisdiction, even though the clause was expressly nonexclusive and Pennsylvania was also an appropriate forum under the agreement.
General Obligations Law § 5-1402 permits parties to maintain an action in New York state courts pursuant to a contractual agreement providing for a choice of New York law and forum in cases involving $1 million or more. Thus, it “preclude^] a New York court from declining jurisdiction even where the only nexus is the contractual agreement” (see National Union Fire Ins. Co. of Pittsburgh, Pa. v Worley, 257 AD2d 228, 230 [1999] [emphasis *497deleted]). Indeed, CPLR 327, which allows a court to dismiss or stay a case on the basis of inconvenient forum, specifically states that it has no application to an action arising out of an agreement to which General Obligations Law § 5-1402 applies (CPLR 327 [b]). Thus, General Obligations Law § 5-1402 and CPLR 327 (b) prevent a party that has agreed to jurisdiction in New York from later asserting that the New York courts are inconvenient or that they lack jurisdiction.
However, defendant did not base its motion on either lack of jurisdiction or forum non conveniens. Rather, defendant based its motion on the circumstance that a more complete action was pending in Pennsylvania and that plaintiff had filed this preemptive declaratory judgment action to deprive it (the true plaintiff) of its choice of forum. We doubt that the Legislature intended General Obligations Law § 5-1402 to sanction preemptive and piecemeal litigation (see L-3 Communications, 45 AD3d at 8).
In view of the imposition of the stay, the motion court appropriately denied plaintiffs cross motion as moot.
We have considered plaintiffs remaining contentions and find them unavailing. Concur—Tom, J.P., Moskowitz, Freedman, Richter and Manzanet-Daniels, JJ.