Exhibit 23.1 CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM We consent to the reference to our firm under the caption "Experts" in Amendment No. 1 to the Registration Statement (Form S-4 No. 333-116526) and related Prospectus of F.N.B. Corporation for the registration of 4,250,000 shares of its common stock and to the incorporation by reference therein of our report dated February 24, 2004, with respect to the consolidated financial statements of F.N.B. Corporation, included in its Annual Report (Form 10-K) for the year ended December 31, 2003, filed with the Securities and Exchange Commission. ERNST & YOUNG LLP July 19, 2004 Pittsburgh, Pennsylvania