Ordered that the order is reversed insofar as appealed from, on the law, with costs, that branch of the cross motion which was to dismiss the complaint is denied, and the complaint is reinstated.
The Supreme Court had no authority to dismiss the complaint merely because the subject shareholders' agreement contained a mandatory arbitration clause ( see Allied Bldg. Inspectors Intl. Union of Operating Engrs., Local Union No. 211, AFL-CIO v. Office of Labor Relations of City of N.Y., 45 NY2d 735, 738). Rather, upon a proper and timely motion by the defendants pursuant to CPLR 7503 (a), the court could have stayed the action and directed the parties to arbitrate. In the six years this action has been pending, however, the defendants never moved for relief under CPLR 7503 (a). Instead, they answered the complaint, asserted a counterclaim, and even moved, inter alia, for summary judgment dismissing the complaint. Under the circumstances, the defendants waived their right to arbitration ( see Grenadeir Parking Corp. v. Landmark Assoc., 294 AD2d 313; see also Sherrill v. Grayco Bldrs., 64 NY2d 261, 272). Accordingly, the order must be reversed insofar as appealed from and the complaint reinstated.