EXHIBIT 5.1 RIORDAN & McKINZIE 300 South Grand Avenue, Suite 2900 Los Angeles, California 90071 December 19, 1997 The Pantry, Inc. Post Office Box 1410 1801 Douglas Drive Sanford, North Carolina 27331-1440 Sandhills, Inc. 913 Market Street, Suite 806 Wilmington, Delaware 19801 Lil' Champ Food Stores, Inc. 9143 Phillips Highway, Suite 200 Post Office Box 23180 Jacksonville, Florida 32241-3180 Re: The Pantry, Inc. -- 10 1/4% Senior Subordinated Notes due October 15, 2007 -- Registration Statement on Form S-4 ----------------------------------------------------------- Ladies and Gentlemen: We have acted as counsel to The Pantry, Inc., a Delaware corporation (the "Company"), Sandhills, Inc., a Delaware corporation ("Sandhills'), and Lil' Champ Food Stores, Inc., a Florida corporation ("Lil' Champ"; Sandhills and Lil' Champ shall be collectively referred to as the "Guarantors"), in connection with the registration under the Securities Act of 1933, as amended (the "Securities Act") of, and the offer to exchange, the Company's 10 1/4% Senior Subordinated Notes due October 15, 2007 to be registered with the Securities and Exchange Commission (the "Commission") (the "Exchange Notes"), for its outstanding 10 1/4% Senior Subordinated Notes due October 15, 2007. This opinion is delivered to you in connection with the Registration Statement on Form S-4 (the "Registration Statement") for the aforementioned Exchange Notes and exchange offer, filed as of the date hereof with the Commission under the Securities Act. Capitalized terms used herein without definition shall have the meanings given to them in the Registration Statement. The Pantry, Inc. Sandhills, Inc. Lil' Champ Food Stores, Inc. December 19, 1997 Page 2 In rendering this opinion, we have examined copies identified to our satisfaction as being copies of the Indenture, attached as an exhibit to the Registration Statement, and originals, counterparts or copies identified to our satisfaction as being true copies of such other documents as we have deemed necessary or appropriate to render the opinions given below. We have assumed the authenticity of all documents submitted to us as originals and the conformity to authentic original documents of all documents submitted to us as certified, conformed or photostatic copies. We have investigated such questions of law for the purpose of rendering this opinion as we have deemed necessary. We express no opinion with respect to compliance with state securities laws or with respect to any state or federal fraudulent conveyance statutes. Based upon the foregoing and subject to the qualifications, exceptions and limitations set forth herein, we are of the opinion that, when the Indenture shall become qualified under the Trust Indenture Act of 1939, as amended, and when the Exchange Notes and the Guarantees shall have been duly executed, authenticated and delivered in accordance with the Indenture and the exchange offer contemplated by the Registration Statement, the Exchange Notes and Guarantees will be legally issued and fully paid and constitute the legally valid and binding obligations of the Company and the Guarantors, respectively. To the extent that the obligations of the Company under the Indenture may be dependent upon such matters, we assume for purposes of this opinion that the Trustee is duly organized, validly existing and in good standing under the laws of its jurisdiction of organization; that the Trustee is duly qualified to engage in the activities contemplated by the Indenture; that the Indenture has been duly authorized, executed and delivered by the Trustee and constitutes the valid, binding and enforceable obligation of the Trustee; that the Trustee is in compliance, generally and with respect to acting as a trustee under the Indenture, with all applicable laws and regulations; and that the Trustee has the requisite corporate and legal power and authority to perform its obligations under the Indenture. We advise you that certain members of this firm own interests, directly or indirectly, in a partnership which owns a majority of the stock of the Company. The Pantry, Inc. Sandhills, Inc. Lil' Champ Food Stores, Inc. December 19, 1997 Page 3 We hereby consent to the filing of this opinion as an exhibit to the Registration Statement and to the reference to this firm under the caption "Legal Matters" in the Prospectus which is a part of the Registration Statement. Very truly yours, /s/ Riordan & McKinzie