Exhibit 23 Consent of Independent Registered Public Accounting Firm We consent to the incorporation by reference in the Registration Statements (Form S-8 Nos. 33-67962, 333-69895, 333-87413, 333-42922, 333-73738, 333- 88398, 333-91906 and 333-125093) pertaining to the Employee Savings Plan of Ohio Casualty Insurance Company of our report dated June 3, 2005, 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, 2004. /s/ Ernst & Young LLP June 27, 2005