Order, Supreme Court, New York County, entered June 26, 1989 (Leonard N. Cohen, J.), which granted plaintiffs’ motion for leave to serve a second amended complaint pursuant to CPLR 3025 (b), unanimously reversed, on the law, the facts, and the exercise of discretion, and the motion denied, with costs.
Plaintiffs are two interrelated corporations engaged in the business of selling commercial time in syndicated radio programs as well as other advertising promotions. Defendant-appellant Bozell & Jacobs, Inc. (Bozell) is an advertising agency, and defendant Lee Company is one of its clients. In an amended complaint served in November 1983 plaintiffs alleged that Bozell had entered into three contracts for the purchase of radio time and other services on behalf of Lee which were thereafter breached to plaintiffs’ damage. Trial of the action commenced before Justice Cohen in August 1988, and on August 16 the court granted Bozell’s motion to dismiss the amended complaint against it on the ground that on its face it stated no cause of action against Bozell as agent for a fully *146disclosed principal (see, Seguros Banvenez v S/S Oliver Drescher, 761d 855, 860). The balance of the action against Lee was severed.
About six months later in February 1989, plaintiffs moved for leave to serve a second amended complaint closely tracking its predecessor pleading, the only significant difference being the removal of all allegations pertaining to Bozell’s agency status, and asserting that Bozell acted as a coprincipal with its client, Lee. The court granted plaintiffs’ motion stating that "[T]he proposed second amended complaint states a viable cause of action”. At that juncture of the case mere facial viability was, as a matter of law, an insufficient test. Plaintiffs’ pursuit of Bozell as a principal in the alleged transactions was devoid of substantive merit and the motion should have been denied on that ground (East Asiatic Co. v Corash, 34 AD2d 432; see, Daniels v Empire-Orr, Inc., 151 AD2d 370, 371). Plaintiffs’ supporting affidavits, consisting entirely of either hearsay or irrelevant matter, were plainly insufficient (C&K Realty Co. v ISFC Fabrics Corp., 66 AD2d 697), and the exhibits annexed thereto were contradictory of the theory of liability proposed (see, 805 Third Ave. Co. v M.W. Realty Assocs., 58 NY2d 447, 451).
We further find the granting of leave to constitute an improvident exercise of discretion. The totality of the circumstances presented here, including the five-year delay by the plaintiffs in seeking to amend, their sudden change of theory for liability from agent to principal as against defendant Bozell, and the extensive depositions and preparation for trial entirely based upon defendant Bozell’s participation in the contracts solely as agent for defendant Lee, warranted denial of the motion to amend on the basis of substantial prejudice to defendant Bozell (Williams v New York Univ. Hosp., 88 AD2d 540; Conley v Gravitt, 133 AD2d 966). Concur—Ross, J. P., Rosenberger, Asch, Kassal and Wallach, JJ.