Exhibit 23 Consent of Independent Registered Public Accounting Firm We consent to the incorporation by reference in the Registration Statement (Form S-8 No. 333-69895) pertaining to The Ohio Casualty Insurance Company Employee Savings Plan of our report dated May 26, 2006, with respect to the financial statements and schedule of The Ohio Casualty Insurance Company Employee Savings Plan included in this Annual Report (Form 11-K) for the year ended December 31, 2005. /s/ Ernst & Young, LLP Cincinnati, Ohio June 19, 2006