PA DIRECT DIAL (215) 699-6000 April 10, 1996 Mr. Merrill S. Moyer Chairman and President Univest Corporation of Pennsylvania Broad and Main Streets Souderton, PA 18964 Re: Univest Corporation of Pennsylvania (the "Corporation") Registration Statement on Form S-3 Dear Mr. Moyer: We have acted as counsel to the Corporation in connection with the Corporation's Registration Statement on Form S-3 pertaining to the Corporation's Univest Dividend Reinvestment and Stock Purchase Plan (the "Plan") which covers 500,000 shares of the common stock, $5.00 par value per share, of the Corporation which is being filed this date with the U.S. Securities and Exchange Commission (the "S-3 Registration Statement"). This opinion is being given pursuant to the requirements of the U.S. Securities and Exchange Commission's Regulation S-K. For the purposes of this opinion, we have examined originals, or copies of such records, documents or other instruments as in our judgment are necessary or appropriate to enable us to render the opinion expressed below. These records, documents and instruments included the following: a) the Articles of Incorporation of the Corporation, as amended to date; b) the Bylaws of the Corporation, as amended to date; and c) all records of proceedings and actions of the Board of Directors and of the Shareholders of the Corporation relating to the S-3 Registration Statement and the transactions contemplated thereby. We have also examined such questions of law as we deemed necessary to enable us to render the opinion expressed below. In all such examinations, we have assumed the genuineness of all signatures on original and certified documents, and the conformity to original or certified documents of all documents submitted to us as conformed or photostatic copies. We have assumed for the purposes of this opinion that the S-3 Registration Statement has been filed with the U.S. Securities and Exchange Commission and has become effective under the Securities Act of 1933, as amended. On the basis of the foregoing, and in reliance thereon, and subject to the qualifications set forth below, it is our opinion that those shares of $5.00 par value common stock of the Corporation issued or distributed pursuant to the S-3 Registration Statement and the Plan and paid for in accordance with the terms of the Plan are duly authorized, validly issued, fully paid and non-assessable shares of the Corporation. This opinion is limited to matters expressly set forth herein, and no opinion may be implied or inferred beyond the specific language and scope so stated. Except as provided in the last paragraph of this letter, this opinion may not be quoted in whole or in part, relied upon by any other person or entity, filed with any governmental agency, or otherwise referred to or utilized for any other purpose, without, in each instance, our prior written consent. We hereby consent to the reference to our firm and to this opinion appearing in the Prospectus filed as part of the S-3 Registration Statement as well as any amendments or supplements thereto, and we further consent to the use of this opinion as an exhibit to the S-3 Registration Statement. Very truly yours, /S/Fox, Rothschild, O'Brien & Frankel