EXHIBIT 5 TEXAS OFFICE: SUITE 1775 112 EAST PECAN STREET SAN ANTONIO, TX 78205 (210) 228-9500 FAX: (210) 228-0781 KENNEDY & BARIS, L.L.P. ATTORNEYS AT LAW SEVENTH FLOOR 1225 NINETEENTH STREET, NW WASHINGTON, DC 20036 (202) 835-0313 FAX: (202) 835-0319 MARYLAND OFFICE: SUITE 300 4719 HAMPDEN LANE BETHESDA, MD 20814 (301) 654-6040 FAX: (301) 654-1733 August 28, 1995 Board of Directors Sandy Spring Bancorp, Inc. 17801 Georgia Avenue Olney, Maryland 20832 Gentlemen: As special legal counsel to Sandy Spring Bancorp, Inc. (the "Company"), we have participated in the preparation of the Company's Registration Statement on Form S-8 to be filed with the Securities and Exchange Commission pursuant to the Securities Act of 1933, as amended, relating to the issuance of shares (the "Shares") of the Company's Common Stock pursuant to the exercise of options outstanding under the Sandy Spring Bancorp, Inc. Amended and Restated Stock Option Plan for Employees of Annapolis Bancshares, Inc. (formerly, the Annapolis Bancshares, Inc. Incentive Stock Option Plan) (the "Plan"). As counsel to the Company, we have examined such corporate records, certificates and other documents of the Company, and made such examinations of law and other inquiries of such officers of the Company, as we have deemed necessary or appropriate for purposes of this opinion. Based upon such examinations we are of the opinion that the Shares, when issued in accordance with the provisions of the Plan and the options granted pursuant thereto, will be duly authorized, validly issued, fully paid and non-assessable shares of the Common Stock of the Company. We hereby consent to the inclusion of this opinion as an exhibit to the Registration Statement on Form S-8 filed by the Company and to the reference to our firm contained. Sincerely, /s/ Kennedy & Baris, L.L.P.