— In an action, inter alia, to recover damages for unjust enrichment, the defendants appeal from so much of an order of the Supreme Court, Nassau County (Collins, J.), dated March 22, 1990, as denied those branches of their motion which were to dismiss the first, third, fourth, and fifth causes of action asserted in the complaint.
Ordered that the order is reversed insofar as appealed from, on the law, with costs, and those branches of the motion which were to dismiss the first, third, fourth, and fifth causes of action asserted in the complaint are granted, and the complaint is dismissed in its entirety.
In 1985 the plaintiff brought an action against the defendants in Bronx County, New York, alleging six causes of action arising from his 1984 discharge from employment. Relevant here are the first three causes of action, in which the plaintiff claimed that his employment had been unjustly terminated by the defendants to prevent him from receiving *749payment for his shares of stock in the defendant Industrial Handling Co., Inc. (hereinafter Industrial), pursuant to the terms of a written agreement, as well as to deny him pension benefits from a pension trust. A proposed amended complaint was served in 1986. The second pleading varied these three claims only to the extent of alleging that the defendants had failed to make any payment to the plaintiff for the stock despite due demand therefor, and that the defendants had refused to pay him any benefits under a pension trust and "profit sharing plan”.
By order dated December 18, 1986, the Supreme Court, Bronx County (Turret, J.) granted the defendants’ motion to dismiss the complaint and denied the plaintiff’s cross motion to amend that pleading. The court held, inter alia, that the first three causes of action failed to state a cause of action because they were grounded on the tort of wrongful discharge of an at-will employee, a theory not recognized in New York, and that the proposed amended complaint was legally deficient as well. The plaintiff served a notice of appeal and civil preargument statement, but that appeal to the Appellate Division, First Department was never perfected. The Supreme Court denied the plaintiff’s subsequent motion for reargument by order dated June 11, 1987.
In or about March 1989, the plaintiff brought the present action in the Supreme Court, Nassau County. Five causes of action were alleged against the defendants. In the first, brought against all of the defendants, the plaintiff alleged that he had paid $25,000 for the purchase of stock in Industrial, and that the defendants had failed either to issue the stock pursuant to the written agreement or to return his payment. In the third, fourth, and fifth causes of action, brought against Industrial, another corporate defendant, and Samuel Glick as trustee of Industrial’s employee pension plans, the plaintiff alleged that prior to the termination of his employment he had become entitled to pension benefits, profit sharing benefits, and insurance benefits, and that the defendants had refused to pay him under such plans.
The defendants moved to dismiss the complaint on the ground of res judicata pursuant to CPLR 3211 (a) (5). The Supreme Court concluded that because the subject claims did not arise out of the alleged wrongful discharge of plaintiff they could be maintained. We disagree.
Under the transactional analysis test adopted by the Court of Appeals, subsequent claims are barred if they are coterminous with the transaction or series of transactions from which *750the earlier claims arose, meaning that the facts upon which these claims are based " 'are related in time, space, origin, or motivation * * * they form a convenient trial unit, and * * * their treatment as a unit conforms to the parties’ expectations or business understanding or usage’ ” (Smith v Russell Sage Coll., 54 NY2d 185, 192-193, citing Restatement [Second] of Judgments §§ 61, 61.1 [Tent Draft Nos. 1, 5], currently Restatement [Second] of Judgments § 24 [2]; see also, Boronow v Boronow, 71 NY2d 284; Matter of Reilly v Reid, 45 NY2d 24). Under this analysis, a variation in the facts alleged, legal theories asserted, or relief sought in the new pleading generally will not affect the result, because separately stated causes of action "may nevertheless be grounded on the same gravamen of the wrong upon which the action is brought” (Matter of Reilly v Reid, supra, at 29).
Applying these principles to the case at bar we conclude that the first, third, fourth, and fifth causes of action arise from and are integrally related to the same series of transactions which were alleged in the Bronx County action, i.e., the forced termination of the plaintiff’s employment by the defendants and their subsequent disputes concerning the former’s rights upon such termination. They are therefore barred. Once the Supreme Court, Bronx County had determined that the plaintiff could not assert viable claims against the defendants based upon the facts alleged in the complaint and the proposed amended complaint, the plaintiff’s proper course was to challenge that ruling on appeal, not to commence another action (see, Feigen v Advance Capital Mgt. Corp., 146 AD2d 556, 558-559). In view of the foregoing, all the remaining causes of action of the present action must be dismissed (CPLR 3211 [a] [5]). Bracken, J. P., Sullivan, Balletta and Copertino, JJ., concur.