Exhibit 5 Opinion of Elias, Matz, Tiernan & Herrick L.L.P. Exhibit 5 Law Offices ELIAS, MATZ, TIERNAN & HERRICK L.L.P. 12th Floor 734 15th Street, N.W. Washington, D.C. 20005 _________ TIMOTHY B. MATZ JEFFREY D. HAAS STEPHEN M. EGE Telephone: (202) 347-0300 KEVIN M. HOULIHAN RAYMOND A. TIERNAN Facsimile: (202) 347-2172 KENNETH B. TABACH W. MICHAEL HERRICK PATRICIA J. WOHL GERARD L. HAWKINS FIORELLO J. VICENCIO* NORMAN B. ANTIN DAVID TEEPLES JOHN P. SOUKENIK* ERIC M. MARION GERALD F. HEUPEL, JR. DANIEL R. KLEINMAN* JEFFREY A. KOEPPEL DANIEL P. WEITZEL PHILIP ROSS BEVAN OF COUNSEL HUGH T. WILKINSON ALLIN P. BAXTER February 4, 2000 JACK I. ELIAS SHERYL JONES ALU *NOT ADMITTED IN D.C. VIA EDGAR Board of Directors Willow Grove Bancorp, Inc. Welsh and Norristown Roads Maple Glen, Pennsylvania 19002 Re: Registration Statement on Form S-8 224,087 Shares of Common Stock Gentlemen: We are special counsel to Willow Grove Bancorp, Inc., a United States corporation (the "Corporation"), in connection with the preparation and filing with the Securities and Exchange Commission pursuant to the Securities Act of 1933, as amended, of a Registration Statement on Form S-8 (the "Registration Statement"), relating to the registration of up to 224,087 shares of common stock, par value $0.01 per share ("Common Stock"), to be issued pursuant to the Corporation's 1999 Stock Option Plan (the "Plan") upon the exercise of stock options and/or appreciation rights (referred to as "Option Rights"). The Registration Statement also registers an indeterminate number of additional shares which may be necessary under the Plan to adjust the number of shares reserved thereby for issuance as the result of a stock split, stock dividend or similar adjustment of the outstanding Common Stock of the Corporation. We have been requested by the Corporation to furnish an opinion to be included as an exhibit to the Registration Statement. For this purpose, we have reviewed the Registration Statement and related Prospectus, the Articles of Incorporation and Bylaws of the Corporation, the Plan, a specimen stock certificate evidencing the Common Stock of the Corporation and such other corporate records and documents as we have deemed appropriate. We are relying upon the originals, or copies certified or otherwise identified to our satisfaction, of the corporate records of the Corporation and such other instruments, certificates and representations of public officials, officers and representatives of the Corporation as we have deemed relevant as a basis for this opinion. In addition, we have assumed, without independent verification, the genuineness of all signatures and the authenticity of all documents furnished to us and the conformance in all respects of copies to originals. Furthermore, we have made such factual inquiries and reviewed such laws as we determined to be relevant for this opinion. For purposes of this opinion, we have also assumed that (i) the shares of Common Stock issuable pursuant to Option Rights granted under the terms of the Plan will continue to be validly authorized on the dates the Common Stock is issued pursuant to the Option Rights; (ii) on the dates the Option Rights are exercised, the Option Rights granted under the terms of the Plan will constitute valid, legal and binding obligations of the Corporation and will (subject to applicable bankruptcy, moratorium, insolvency, reorganization and other laws and legal principles affecting the enforceability of creditors' rights generally) be enforceable as to the Corporation in accordance with their terms; (iii) the Option Rights are exercised in accordance with their terms and the exercise price therefor is paid in accordance with the terms thereof; (iv) no change occurs in applicable law or the pertinent facts; and (v) the provisions of "blue sky" and other securities laws as may be applicable will have been complied with to the extent required. Based on the foregoing, and subject to the assumptions set forth herein, we are of the opinion as of the date hereof that the shares of Common Stock to be issued pursuant to the Plan, when issued and sold pursuant to the Plan and upon receipt of the consideration required thereby, will be legally issued, fully paid and non-assessable shares of Common Stock of the Corporation. We hereby consent to the reference to this firm under the caption "Legal Opinion" in the Prospectus of the Plan and to the filing of this opinion as an exhibit to the Registration Statement. Very truly yours, ELIAS, MATZ, TIERNAN & HERRICK L.L.P. By: /s/ Hugh T. Wilkinson ---------------------------- Hugh T. Wilkinson, a Partner