Exhibit 5 , 1997 S&T Bancorp, Inc. 800 Philadelphia Street Indiana, PA 15701 Ladies and Gentlemen: Reference is made to the Registration Statement on Form S-4 ("Registration Statement") of S&T Bancorp, Inc., a Pennsylvania corporation ("S&T"), with respect to 3,036,075 shares of $2.50 par value common stock of S&T ("S&T Common Stock") that may be issued in connection with the proposed transaction pursuant to which Peoples Bank of Unity ("Peoples") will be merged (the "Merger") with and into S&T's wholly-owned subsidiary, S&T Bank. The Merger is to be effected pursuant to an Agreement and Plan of Reorganization, dated as of November 25, 1996, and a related Agreement and Plan of Merger (collectively, the "Agreement") between S&T and Peoples and joined in by S&T Bank, pursuant to which each share of the $10.00 par value common stock of Peoples ("Peoples Common Stock") outstanding immediately prior to the effective time of the Merger (other than shares held by dissenting shareholders) will be converted into 26.25 shares of S&T Common Stock, with cash being paid in lieu of the issuance of fractional shares. We have been requested to furnish an opinion to be included as Exhibit 5 to the Registration Statement. In conjunction with the furnishing of this opinion, we have examined such corporate documents and have made such investigation of matters of fact and law as we have deemed necessary to render this opinion. Our opinion is based on our review of the latest standard compilation available to us of the Pennsylvania Business Corporation Law of 1988. Based upon such examination and investigation and upon the assumption that there will be no material changes in the documents we examined and the matters investigated, we are of the opinion that the shares of S&T Common Stock included in the Registration Statement that may be issued to the holders of Peoples Common Stock in connection with the Merger have been duly authorized by S&T and that, when issued to such shareholders in accordance with the terms of the Agreement upon consummation of the Merger, such shares of S&T Common Stock will be validly issued, fully paid, and nonassessable under the Pennsylvania Business Corporation Law of 1988 as in effect on this date. We consent to the filing of this opinion as an exhibit to the Registration Statement and to the reference to us under the caption "Legal Opinion" in the Proxy Statement/Prospectus included therein. In giving the foregoing consent, we do not thereby admit that we are in the category of persons whose consent is required under Section 7 of the Securities Act of 1933, as amended, or the rules and regulations of the Securities and Exchange Commission thereunder. Sincerely,