Proceeding pursuant to CPLR article 78 to review a determination of respondent, dated May 4, 1977, which, after a hearing, dismissed petitioner from his position as a senior plumbing inspector with the Department of Buildings of the City of New York on the ground that he had accepted a $50 bribe. Petition granted and determination annulled, on the law, without costs or disbursements, and respondent is directed to reinstate petitioner with back pay, less the amount of compensation earned in any employment or occupation and any unemployment benefits he may have received. A review of the record as a whole indicates that the charges against petitioner were not supported by substantial evidence. We would note that the petitioner, who vigorously denied the charges, had been in the employ of the Department of Buildings for almost 25 years, and had an unblemished record prior to the bringing of these accusations. The only evidence of any significance against'petitioner was the oral testimony of one Peter Roberto, who admitted to having been engaged in the widespread bribery of officials over a period of years, and who had become a paid informer and undercover agent for the Department of Investigation only after he had bribed an undercover police officer posing as an inspector and had been called in for questioning. Eventually, Roberto *870received transactional immunity for his participation in the illegal activities about which he testified. The record of the hearing indicates serious discrepancies between the testimony of Roberto at petitioner’s disciplinary hearing and his prior testimony at the trial of another inspector, as well as other serious contradictions in the evidence against petitioner. In addition, the lengthy decision of the hearing examiner indicates that the determination of petitioner’s guilt was apparently founded, to a great extent, on the consideration of collateral matters not material to the charges and that there was a definite inclination on the part of the hearing officer to find against petitioner because of guilt by association, i.e., the allegedly widespread practice of bribery of inspectors. Although we are aware that the scope of our review in this case is limited to the question of whether on the entire record substantial evidence was presented (see CPLR 7803, subd 4), and that we are not empowered to substitute our judgment for that of the administrative agency where we find that the weight of the evidence is contrary to the agency’s determination (see Matter of Collins v Codd, 38 NY2d 269; Matter of Stork Rest, v Boland, 282 NY 256), we are convinced that the case against petitioner was so deficient as to warrant the annulment of this determination and the reinstatement of petitioner to his position. Latham, J. P., Damiani, Cohalan and Hawkins, JJ., concur.