Consent of Independent Registered Public Accounting Firm

                                  EXHIBIT 23.1

We consent to the incorporation by reference in the Registration Statement (Form
S-8 No. 333-02513) pertaining to the Univest 1996 Employee Stock Purchase Plan
of Univest Corporation of Pennsylvania and in the related Prospectus, in the
Registration Statement (Form S-8 No. 333-24987) pertaining to the Univest
Corporation of Pennsylvania 1993 Long Term Incentive Plan and in the related
Prospectus, and in the Registration Statement (Form S-3 No. 333-02509)
pertaining to the Univest Dividend Reinvestment and Stock Purchase Plan of
Univest Corporation of Pennsylvania of our report dated February 23, 2004 with
respect to the consolidated financial statements of Univest Corporation of
Pennsylvania included in the Annual Report (Form 10-K) for the year ended
December 31, 2004.

                                    /s/ Ernst & Young LLP

Philadelphia, Pennsylvania
March 2, 2005