Ordered that the order is affirmed insofar as appealed from, with costs.
Contrary to the plaintiff's contention, the Supreme Court properly denied his motion for summary judgment since he failed to establish his prima facie entitlement to such relief ( see CPLR 3212).
Although the defendant did not move for summary judgment, the Supreme Court had the authority pursuant to CPLR 3212 (b) to search the record and award summary judgment to a nonmoving party with respect to an issue that was the subject of the motion before the court ( see Dunham v. Hilco Constr. Co., 89 NY2d 425, 429; Goldstein v. County of Suffolk, 300 AD2d 441; Image Clothing v. State Natl. Ins. Co., 291 AD2d 377, 378). Under the circumstances of this case, the Supreme Court properly searched the record and awarded summary judgment to the defendant dismissing the complaint.