In a proceeding pursuant to CELR article 78 to review a determination of the Commissioner of the Fire Department of the City of New York which terminated the petitioner’s employment as a New York City Firefighter, the appeal is from so much of an order of the Supreme Court, Kings County (Schneier, J.), dated August 2, 2005, as, upon reargument, granted that branch of the petition which was for a name-clearing hearing, which had previously been denied in an order of the same court dated December 2, 2004.
*859Ordered that the order is reversed insofar as appealed from, on the law, with costs, and upon reargument, the determination in the order dated December 2, 2004 denying that branch of the petition is adhered to.
The parties’ stipulation of settlement with respect to previous disciplinary charges provided that the petitioner, in exchange for having the charges against him dropped, would be subject to random testing for controlled substances and that a finding of a controlled substance in his blood or urine would result in termination “without a hearing of any kind.” Accordingly, the petitioner knowingly waived his right to a name-clearing hearing to challenge the results of the random drug test (see e.g. Matter of Brothers v Pilgrim Psychiatric Ctr. of N.Y. State Off. of Mental Health, 131 AD2d 756 [1987]; Matter of Nedd v Koehler, 159 AD2d 344 [1990]; Montiel v Kiley, 147 AD2d 402 [1989]). Schmidt, J.P., Santueci, Krausman and Rivera, JJ., concur.