EX-23.1 5 a07-5459_1ex23d1.htm EX-23.1

Exhibit 23.1

Consent of Independent Registered Public Accounting Firm

The Board of Directors and Shareholders

RLI Corp.:

We consent to the incorporation by reference in the registration statements on Form S-8 (Nos. 333-01637, 333-28625, 333-117714 and 333-125354) of RLI Corp. of our reports dated February 28, 2007, with respect to the consolidated balance sheets of RLI Corp. and Subsidiaries as of December 31, 2006 and 2005, and the related consolidated statements of earnings and comprehensive earnings, shareholders’ equity, and cash flows for each of the years in the three-year period ended December 31, 2006, and all related financial statement schedules, management’s assessment of the effectiveness of internal control over financial reporting as of December 31, 2006 and the effectiveness of internal control over financial reporting as of December 31, 2006, which reports are incorporated by reference in, or appear in, the December 31, 2006 annual report on Form 10-K of RLI Corp.

/s/ KPMG LLP                     

Chicago, Illinois

February 28, 2007

54