EXHIBIT 10.14



                           COMPANY SECURITY AGREEMENT


         This COMPANY SECURITY AGREEMENT (this "AGREEMENT") is dated as of
October 23, 1997 and entered into by and between THE PANTRY, INC., a Delaware
corporation ("GRANTOR"), and FIRST UNION NATIONAL BANK, as administrative agent
for and representative of (in such capacity herein called "SECURED PARTY") the
financial institutions ("LENDERS") party to the Credit Agreement referred to
below and any Interest Rate Exchangers (as hereinafter defined).


                             PRELIMINARY STATEMENTS

         A.   Secured Party, Syndication Agent and Lenders have entered into a
Credit Agreement dated as of October 23, 1997 (said Credit Agreement, as it may
hereafter be amended, supplemented or otherwise modified from time to time,
being the "CREDIT AGREEMENT", the terms defined therein and not otherwise
defined herein being used herein as therein defined) with Grantor pursuant to
which Lenders have made certain commitments, subject to the terms and conditions
set forth in the Credit Agreement, to extend certain credit facilities to
Grantor.

         B.   Grantor may from time to time enter into one or more Interest Rate
Agreements (collectively, the "LENDER INTEREST RATE AGREEMENTS") with one or
more Lenders (in such capacity, collectively, "INTEREST RATE EXCHANGERS") in
accordance with the terms of the Credit Agreement, and it is desired that the
obligations of Grantor under the Lender Interest Rate Agreements, including the
obligation of Grantor to make payments thereunder in the event of early
termination thereof, together with all obligations of Grantor under the Credit
Agreement and the other Loan Documents, be secured hereunder.

         C.   It is a condition precedent to the initial extensions of credit by
Lenders under the Credit Agreement that Grantor shall have granted the security
interests and undertaken the obligations contemplated by this Agreement.

         NOW, THEREFORE, in consideration of the premises and in order to induce
Lenders to make Loans and other extensions of credit under the Credit Agreement
and to induce Interest Rate Exchangers to enter into the Lender Interest Rate
Agreements, and for other good and valuable consideration, the receipt and
adequacy of which are hereby acknowledged, Grantor hereby agrees with Secured
Party as follows:

         SECTION 1.  GRANT OF SECURITY.  Grantor hereby grants to Secured Party
                     -----------------                                         
a security interest in, all of Grantor's right, title and interest in and to the
following, in each case whether now or hereafter existing or in which Grantor
now has or

                                       1

 
hereafter acquires an interest and wherever the same may be located (the
"COLLATERAL"):

         (a) all equipment in all of its forms, all parts thereof and all
accessions thereto (any and all such equipment, parts and accessions being the
"EQUIPMENT");

         (b) all inventory in all of its forms (including (i) all goods held by
Grantor for sale or lease or to be furnished under contracts of service or so
leased or furnished, (ii) all raw materials, work in process, finished goods,
and materials used or consumed in the manufacture, packing, shipping,
advertising, selling, leasing, furnishing or production of such inventory or
otherwise used or consumed in Grantor's business, (iii) all goods in which
Grantor has an interest in mass or a joint or other interest or right of any
kind, (iv) all goods which are returned to or repossessed by Grantor, and (v)
all accessions thereto and products thereof (all such inventory, accessions and
products being the "INVENTORY") and all negotiable documents of title (including
warehouse receipts, dock receipts and bills of lading) issued by any Person
covering any Inventory (any such negotiable document of title being a
"NEGOTIABLE DOCUMENT OF TITLE");

         (c) all accounts, contract rights, chattel paper, documents,
instruments, general intangibles and other rights and obligations of any kind
and all rights in, to and under all security agreements, leases and other
contracts securing or otherwise relating to any such accounts, contract rights,
chattel paper, documents, instruments, general intangibles or other obligations
(any and all such accounts, contract rights, chattel paper, documents,
instruments, general intangibles and other obligations being the "ACCOUNTS", and
any and all such security agreements, leases and other contracts being the
"RELATED CONTRACTS");

         (d) the agreements listed in Part A of Schedule II annexed hereto, as
                                                -----------                   
each such agreement may be amended, supplemented or otherwise modified from time
to time (said agreements, as so amended, supplemented or otherwise modified,
being referred to herein individually as an "ASSIGNED AGREEMENT" and
collectively as the "ASSIGNED AGREEMENTS"), including (i) all rights of Grantor
to receive moneys due or to become due under or pursuant to the Assigned
Agreements, (ii) all rights of Grantor to receive proceeds of any insurance,
indemnity, warranty or guaranty with respect to the Assigned Agreements, (iii)
all claims of Grantor for damages arising out of any breach of or default under
the Assigned Agreements, and (iv) all rights of Grantor to terminate, amend,
supplement, modify or exercise rights or options under the Assigned Agreements,
to perform thereunder and to compel performance and otherwise exercise all
remedies thereunder;

                                       2

 
         (e) all deposit accounts, including the deposit accounts listed on part
B of Schedule II  annexed hereto and all other deposit accounts maintained with
     ------------                                                              
Secured Party;

         (f) all trademarks, tradenames, tradesecrets, business names, patents,
patent applications, licenses, copyrights, registrations and franchise rights,
and all goodwill associated with any of the foregoing;

         (g) to the extent not included in any other paragraph of this Section
1, all other general intangibles (including tax refunds, rights to payment or
performance, choses in action and judgments taken on any rights or claims
included in the Collateral);

         (h) all plant fixtures, business fixtures and other fixtures and
storage and office facilities, and all accessions thereto and products thereof;

         (i) all books, records, ledger cards, files, correspondence, computer
programs, tapes, disks and related data processing software that at any time
evidence or contain information relating to any of the Collateral or are
otherwise necessary or helpful in the collection thereof or realization
thereupon; and

         (j) all proceeds, products, rents and profits of or from any and all of
the foregoing Collateral and, to the extent not otherwise included, all payments
under insurance (whether or not Secured Party is the loss payee thereof), or any
indemnity, warranty or guaranty, payable by reason of loss or damage to or
otherwise with respect to any of the foregoing Collateral.  For purposes of this
Agreement, the term "PROCEEDS" includes whatever is receivable or received when
Collateral or proceeds are sold, exchanged, collected or otherwise disposed of,
whether such disposition is voluntary or involuntary.

         Notwithstanding the foregoing, nothing in this Section 1 or otherwise
in this Agreement shall constitute a grant by Grantor of a security interest in
any contract, document, instrument, general intangible, lease, license or other
right of any kind to the extent such a grant of a security interest would, after
giving effect to the provisions of subsection 9-318 of the Uniform Commercial
Code for the relevant jurisdiction, constitute a breach or violation of any term
thereof.

         SECTION 2.  SECURITY FOR OBLIGATIONS.  This Agreement secures, and the
                     ------------------------                                  
Collateral is collateral security for, the prompt payment or performance in full
when due, whether at stated maturity, by required prepayment, declaration,
acceleration, demand or otherwise (including the payment of amounts that would
become due but for the operation of the automatic stay under Section 362(a) of
the Bankruptcy Code, 11 U.S.C. (S)362(a)), of all obligations and liabilities of
every nature of Grantor now or hereafter existing under or arising out of or in
connection with

                                       3

 
the Credit Agreement and the other Loan Documents and the Lender Interest Rate
Agreements and all extensions or renewals thereof, whether for principal,
interest (including interest that, but for the filing of a petition in
bankruptcy with respect to Grantor, would accrue on such obligations),
reimbursement of amounts drawn under Letters of Credit, payments for early
termination of Lender Interest Rate Agreements, fees, expenses, indemnities or
otherwise, whether voluntary or involuntary, direct or indirect, absolute or
contingent, liquidated or unliquidated, whether or not jointly owed with others,
and whether or not from time to time decreased or extinguished and later
increased, created or incurred, and all or any portion of such obligations or
liabilities that are paid, to the extent all or any part of such payment is
avoided or recovered directly or indirectly from Secured Party, Syndication
Agent or any Lender or Interest Rate Exchanger as a preference, fraudulent
transfer or otherwise and all obligations of every nature of Grantor now or
hereafter existing under this Agreement (all such obligations of Grantor being
the "SECURED OBLIGATIONS").

         SECTION 3.  GRANTOR REMAINS LIABLE.  Anything contained herein to the
                     ----------------------                                   
contrary notwithstanding, (a) Grantor shall remain liable under any contracts
and agreements included in the Collateral, to the extent set forth therein, to
perform all of its duties and obligations thereunder to the same extent as if
this Agreement had not been executed, (b) the exercise by Secured Party of any
of its rights hereunder shall not release Grantor from any of its duties or
obligations under the contracts and agreements included in the Collateral, and
(c) Secured Party shall not have any obligation or liability under any contracts
and agreements included in the Collateral by reason of this Agreement, nor shall
Secured Party be obligated to perform any of the obligations or duties of
Grantor thereunder or to take any action to collect or enforce any claim for
payment assigned hereunder.

         SECTION 4.  REPRESENTATIONS AND WARRANTIES.  Grantor represents and
                     ------------------------------                         
warrants as follows:

         (a) Ownership of Collateral.  Except for the security interest created
             -----------------------                                           
by this Agreement or any other Collateral Document, Grantor owns the Collateral
free and clear of any Lien except for Permitted Encumbrances and Liens permitted
under subsections 7.2A(iv) and (v) of the Credit Agreement (with regard to the
Liens permitted under subsections 7.2A(iv) and (v) of the Credit Agreement, only
to the extent such Liens relate to the specific property subject to such Liens).

         (b) Location of Equipment and Inventory.  All of the Equipment and
             -----------------------------------                           
Inventory is, as of the date hereof, located in one of the states (and counties
thereof) specified in Schedule I annexed hereto.
                      ----------                

         (c) Negotiable Documents of Title.  No Negotiable Documents of Title
             -----------------------------                                   
are outstanding with respect to any of the

                                       4

 
Inventory (other than in respect of (i) Inventory with an aggregate value not in
excess of $500,000 or (ii) Inventory which, in the ordinary course of business,
is in transit either (A) from a supplier to Grantor, (B) between Grantor's
retail locations, or (C) to customers of Grantor).

         (d) Office Locations; Other Names.  The chief place of business, the
             -----------------------------                                   
chief executive office and the office where Grantor keeps its records regarding
the Accounts and all originals of all chattel paper that evidence Accounts is,
and has been for the four month period preceding the date hereof, located at the
location(s) specified in Schedule I. Grantor has not in the past five years
                         ----------                                        
done, and does not now do, business under any other name (including any trade-
name or fictitious business name), except as described in Schedule I.
                                                          ---------- 

         (e) Delivery of Certain Collateral.  All notes and other instruments
             ------------------------------                                  
(excluding checks) comprising any and all items of Collateral have been
delivered to Secured Party duly endorsed and accompanied by duly executed
instruments of transfer or assignment in blank.

         SECTION 5.  FURTHER ASSURANCES.
                     ------------------ 

         (a) Grantor agrees that from time to time, at the expense of Grantor,
Grantor will promptly execute and deliver all further instruments and documents,
and take all further action, that may be necessary or desirable, or that Secured
Party may request, in order to perfect and protect any security interest granted
or purported to be granted hereby or to enable Secured Party to exercise and
enforce its rights and remedies hereunder with respect to any Collateral.
Without limiting the generality of the foregoing, Grantor will:  (i) mark
conspicuously each item of chattel paper included in the Accounts, each Related
Contract and, at the request of Secured Party, each of its records pertaining to
the Collateral, with a legend, in form and substance satisfactory to Secured
Party, indicating that such Collateral is subject to the security interest
granted hereby, (ii) at the request of Secured Party, deliver and pledge to
Secured Party hereunder all promissory notes and other instruments (including
checks) and all original counterparts of chattel paper constituting Collateral,
duly endorsed and accompanied by duly executed instruments of transfer or
assignment, all in form and substance satisfactory to Secured Party, (iii)
execute and file such financing or continuation statements, or amendments
thereto, and such other instruments or notices, as may be necessary or
desirable, or as Secured Party may request, in order to perfect and preserve the
security interests granted or purported to be granted hereby, (iv) upon the
request of Secured Party, promptly after the acquisition by Grantor of any item
of Equipment which is covered by a certificate of title under a statute of any
jurisdiction under the law of which indication of a security interest on such
certificate is required as a condition of perfection thereof, execute and file
with the registrar of motor vehicles or other

                                       5

 
appropriate authority in such jurisdiction an application or other document
requesting the notation or other indication of the security interest created
hereunder on such certificate of title, (v) upon the request of Secured Party,
within 30 days after the end of each calendar quarter, deliver to Administrative
Agent copies of all such applications or other documents filed during such
calendar quarter and copies of all such certificates of title issued during such
calendar quarter indicating the security interest created hereunder in the items
of Equipment covered thereby, (vi) at any reasonable time, upon request by
Secured Party, exhibit the Collateral to and allow inspection of the Collateral
by Secured Party, or persons designated by Secured Party, and (vii) at Secured
Party's request, appear in and defend any action or proceeding that may affect
Grantor's title to or Secured Party's security interest in all or any part of
the Collateral.

         (b) Grantor hereby authorizes Secured Party to file one or more
financing or continuation statements, and amendments thereto, relative to all or
any part of the Collateral without the signature of Grantor.  Grantor agrees
that a carbon, photographic or other reproduction of this Agreement or of a
financing statement signed by Grantor shall be sufficient as a financing
statement and may be filed as a financing statement in any and all
jurisdictions.

         (c) Grantor will furnish to Secured Party from time to time statements
and schedules further identifying and describing the Collateral and such other
reports in connection with the Collateral as Secured Party may reasonably
request, all in reasonable detail.

         SECTION 6.  CERTAIN COVENANTS OF GRANTOR.  Grantor shall:
                     ----------------------------                 

         (a) not use or permit any Collateral to be used unlawfully or in
violation of any provision of this Agreement or any applicable statute,
regulation or ordinance or any policy of insurance covering the Collateral;

         (b) notify Secured Party of any change in Grantor's name, identity or
corporate structure within 15 days of such change;

         (c) give Secured Party 30 days' prior written notice of any change in
Grantor's chief place of business, chief executive office or residence or the
office where Grantor keeps its records regarding the Accounts and all originals
of all chattel paper that evidence Accounts;

         (d) if Secured Party gives value to enable Grantor to acquire rights in
or the use of any Collateral, use such value for such purposes; and

                                       6

 
         (e) pay promptly when due all property and other taxes, assessments and
governmental charges or levies imposed upon, and all claims (including claims
for labor, materials and supplies) against, the Collateral, except to the extent
the validity thereof is being contested in good faith; provided that Grantor
                                                       --------             
shall in any event pay such taxes, assessments, charges, levies or claims not
later than five days prior to the date of any proposed sale under any judgement,
writ or warrant of attachment entered or filed against Grantor or any of the
Collateral as a result of the failure to make such payment.

         SECTION 7.  SPECIAL COVENANTS WITH RESPECT TO EQUIPMENT AND INVENTORY.
                     ---------------------------------------------------------  
Grantor shall:

         (a) keep the Equipment and Inventory in the jurisdictions specified on
Schedule I annexed hereto or, upon 30 days' prior written notice to Secured
- ----------                                                                 
Party, at such other places in jurisdictions where all action that may be
necessary in order to perfect and protect any security interest granted or
purported to be granted hereby, or to enable Secured Party to exercise and
enforce its rights and remedies hereunder, with respect to such Equipment and
Inventory shall have been taken;

         (b) cause the Equipment to be maintained and preserved in the same
condition, repair and working order as when new, ordinary wear and tear
excepted, and in accordance with Grantor's past practices.  Grantor shall
promptly furnish to Secured Party a statement respecting any material loss or
damage to any of the Equipment;

         (c) keep correct and accurate records of the Inventory, itemizing and
describing the kind, type and quantity of Inventory, Grantor's cost therefor and
(where applicable) the current list prices for the Inventory;

         (d) if any Inventory is in possession or control of any of Grantor's
agents or processors, if the aggregate book value of all such Inventory exceeds
$500,000, and in any event upon the occurrence of an Event of Default (as
defined in the Credit Agreement), instruct such agent or processor to hold all
such Inventory for the account of Secured Party and subject to the instructions
of Secured Party; and

         (e) promptly upon the issuance and delivery to Grantor of any
Negotiable Document of Title (other than any one or more Negotiable Documents of
Title covering (i) Inventory with an aggregate value not in excess of $500,000
or (ii) Inventory which, in the ordinary course of business, is in transit
either (A) from a supplier to Grantor, (B) between Grantor's retail locations,
or (C) to customers of Grantor), deliver such Negotiable Document of Title to
Secured Party.

         SECTION 8.  INSURANCE.  Grantor shall, at its own expense, maintain
                     ---------                                              
insurance with respect to the Equipment and Inventory in accordance with the
terms of the Credit Agreement.

                                       7

 
         SECTION 9.  SPECIAL COVENANTS WITH RESPECT TO ACCOUNTS AND RELATED
                     ------------------------------------------------------
CONTRACTS.
- --------- 

         (a) Grantor shall keep its chief place of business and chief executive
office and the office where it keeps its records concerning the Accounts and
Related Contracts, and all originals of all chattel paper that evidence
Accounts, at the location therefor specified in Section 4 or, upon 30 days'
prior written notice to Secured Party, at such other location in a jurisdiction
where all action that may be necessary or desirable, or that Secured Party may
request, in order to perfect and protect any security interest granted or
purported to be granted hereby, or to enable Secured Party to exercise and
enforce its rights and remedies hereunder, with respect to such Accounts and
Related Contracts shall have been taken.  Grantor will hold and preserve such
records and chattel paper and will permit representatives of Secured Party at
any time during normal business hours to inspect and make abstracts from such
records and chattel paper, and Grantor agrees to render to Secured Party, at
Grantor's cost and expense, such clerical and other assistance as may be
reasonably requested with regard thereto.  Promptly upon the request of Secured
Party, Grantor shall deliver to Secured Party complete and correct copies of
each Related Contract.

         (b) Grantor shall, for not less than 5 years from the date on which
such Account arose, maintain (i) complete records of each Account, including
records of all payments received, credits granted and merchandise returned, and
(ii) all documentation relating thereto.

         (c) Except as otherwise provided in this subsection (c), Grantor shall
continue to collect, at its own expense, all amounts due or to become due to
Grantor under the Accounts and Related Contracts.  In connection with such
collections, Grantor may take (and, at Secured Party's direction, shall take)
such action as Grantor or Secured Party may deem necessary or advisable to
enforce collection of amounts due or to become due under the Accounts; provided,
                                                                       -------- 
however, that Secured Party shall have the right at any time, upon the
- -------                                                               
occurrence and during the continuation of an Event of Default and upon written
notice to Grantor of its intention to do so, to notify the account debtors or
obligors under any Accounts of the assignment of such Accounts to Secured Party
and to direct such account debtors or obligors to make payment of all amounts
due or to become due to Grantor thereunder directly to Secured Party, to notify
each Person maintaining a lockbox or similar arrangement to which account
debtors or obligors under any Accounts have been directed to make payment to
remit all amounts representing collections on checks and other payment items
from time to time sent to or deposited in such lockbox or other arrangement
directly to Secured Party and, upon such notification and at the expense of
Grantor, to enforce collection of any such Accounts and to adjust, settle or
compromise the amount or payment thereof, in the same manner and to the same
extent as Grantor might have done.  After receipt by Grantor of the notice from

                                       8

 
Secured Party referred to in the proviso to the preceding sentence, (i) all
                                 -------                                   
amounts and proceeds (including checks and other instruments) received by
Grantor in respect of the Accounts and the Related Contracts shall be received
in trust for the benefit of Secured Party hereunder, shall be segregated from
other funds of Grantor and shall be forthwith paid over or delivered to Secured
Party in the same form as so received (with any necessary endorsement) to be
held as cash Collateral and applied as provided by Section 18, and (ii) Grantor
shall not adjust, settle or compromise the amount or payment of any Account, or
release wholly or partly any account debtor or obligor thereof, or allow any
credit or discount thereon.

         SECTION 10.  SPECIAL PROVISIONS WITH RESPECT TO THE ASSIGNED
                      -----------------------------------------------
AGREEMENTS.

         (a)  Grantor shall at its expense:

              (i) perform and observe all terms and provisions of the Assigned
    Agreements to be performed or observed by it, maintain the Assigned
    Agreements in full force and effect, enforce the Assigned Agreements in
    accordance with their terms, and take all such action to such end as may be
    from time to time requested by Secured Party; and

              (ii) furnish to Secured Party, promptly upon receipt thereof,
    copies of all notices, requests and other documents received by Grantor
    under or pursuant to the Assigned Agreements, and from time to time (A)
    furnish to Secured Party such information and reports regarding the Assigned
    Agreements as Secured Party may reasonably request and (B) upon request of
    Secured Party make such demands and requests for information and reports or
    for action as Grantor is entitled to make under the Assigned Agreements.

         (b)  Grantor shall not:

              (i) cancel or terminate any of the Assigned Agreements or consent
    to or accept any cancellation or termination thereof;

              (ii) amend or otherwise modify the Assigned Agreements or give any
    consent, waiver or approval thereunder;

              (iii)  waive any default under or breach of the Assigned
    Agreements;

              (iv) consent to or permit or accept any prepayment of amounts to
    become due under or in connection with the Assigned Agreements, except as
    expressly provided therein; or

              (v) take any other action in connection with the Assigned
    Agreements that would impair the value of the

                                       9

 
    interest or rights of Grantor thereunder or that would impair the interest
    or rights of Secured Party.

         SECTION 11.  DEPOSIT ACCOUNTS.  Upon the occurrence and during the
                      ----------------                                     
continuation of an Event of Default, Secured Party may exercise dominion and
control over, and refuse to permit further withdrawals (whether of money,
securities, instruments or other property) from any deposit accounts maintained
with Secured Party constituting part of the Collateral.

         SECTION 12.  LICENSE OF PATENTS, TRADEMARKS, COPYRIGHTS, ETC.  Grantor
                      -----------------------------------------------          
hereby assigns, transfers and conveys to Secured Party, effective upon the
occurrence of any Event of Default, the nonexclusive right and license to use
all trademarks, tradenames, copyrights, patents or technical processes owned or
used by Grantor that relate to the Collateral and any other collateral granted
by Grantor as security for the Secured Obligations, together with any goodwill
associated therewith, all to the extent necessary to enable Secured Party to
use, possess and realize on the Collateral and to enable any successor or assign
to enjoy the benefits of the Collateral.  This right and license shall inure to
the benefit of all successors, assigns and transferees of Secured Party and its
successors, assigns and transferees, whether by voluntary conveyance, operation
of law, assignment, transfer, foreclosure, deed in lieu of foreclosure or
otherwise.  Such right and license is granted free of charge, without
requirement that any monetary payment whatsoever be made to Grantor.

         SECTION 13.  TRANSFERS AND OTHER LIENS.  Grantor shall not:
                      -------------------------                     

         (a) sell, assign (by operation of law or otherwise) or otherwise
dispose of any of the Collateral, except as permitted by the Credit Agreement;
provided that in the event Grantor makes an Asset Sale or sale and lease-back
- --------                                                                     
transaction permitted by the Credit Agreement and the assets subject to such
Asset Sale or sale and lease-back transaction constitute Collateral, Secured
Party shall release the Collateral that is the subject of such Asset Sale to
Grantor free and clear of any Lien and security interest under this Agreement or
any other Collateral Document concurrently with the consummation of such Asset
Sale or sale and lease-back transaction; provided, further that, as a condition
                                         --------  -------                     
precedent to such release, Secured Party shall have received evidence
satisfactory to it that arrangements satisfactory to it have been made for
delivery to Secured Party of that amount of Net Asset Sale Proceeds required to
be delivered to Secured Party under the Credit Agreement; or

         (b) except for the security interest created by this Agreement, create
or suffer to exist any Lien upon or with respect to any of the Collateral to
secure the indebtedness or other obligations of any Person, except as otherwise
permitted under subsections 7.2A(iv) and (v) of the Credit Agreement (with
regard to the Liens permitted under sections 7.2A(iv) and (v) of

                                       10

 
the Credit Agreement, only to the extent such Liens relate to the specific
property subject to such Liens).  If Grantor proposes to obtain financing
permitted under Section 7.1(iii) of the Credit Agreement with respect to any
asset acquired after the Closing Date ("PERMITTED CAPEX FINANCING"), Secured
Party will either (a) with respect to such asset, subordinate the Lien and
security interest created hereunder to the Lien securing such Permitted CapEx
Financing by a subordination agreement reasonably acceptable to Secured Party
and the provider thereof or (b) if Grantor has not been able, after reasonable
effort, to get the provider of such Permitted CapEx Financing to agree to
subordination, Secured Party will release the Lien and security interest granted
hereunder in such asset.

         SECTION 14.  SECURED PARTY APPOINTED ATTORNEY-IN-FACT.  Grantor hereby
                      ----------------------------------------                 
irrevocably appoints Secured Party as Grantor's attorney-in-fact, with full
authority in the place and stead of Grantor and in the name of Grantor, Secured
Party or otherwise, from time to time in Secured Party's discretion, upon the
occurrence and during the continuation of an Event of Default or Potential Event
of Default, to take any action and to execute any instrument that Secured Party
may deem necessary or advisable to accomplish the purposes of this Agreement,
including:

         (a) to obtain and adjust insurance required to be maintained by Grantor
or paid to Secured Party pursuant to Section 8;

         (b) to ask for, demand, collect, sue for, recover, compound, receive
and give acquittance and receipts for moneys due and to become due under or in
respect of any of the Collateral;

         (c) to receive, endorse and collect any drafts or other instruments,
documents and chattel paper in connection with clauses (a) and (b) above;

         (d) to file any claims or take any action or institute any proceedings
that Secured Party may deem necessary or desirable for the collection of any of
the Collateral or otherwise to enforce the rights of Secured Party with respect
to any of the Collateral;

         (e) to pay or discharge taxes or Liens (other than Liens permitted
under this Agreement or the Credit Agreement) levied or placed upon or
threatened against the Collateral, the legality or validity thereof and the
amounts necessary to discharge the same to be determined by Secured Party in its
sole discretion, any such payments made by Secured Party to become obligations
of Grantor to Secured Party, due and payable immediately without demand;

         (f) to sign and endorse any invoices, freight or express bills, bills
of lading, storage or warehouse receipts, drafts against debtors, assignments,
verifications and notices in

                                       11

 
connection with Accounts and other documents relating to the Collateral; and

         (g) generally to sell, transfer, pledge, make any agreement with
respect to or otherwise deal with any of the Collateral as fully and completely
as though Secured Party were the absolute owner thereof for all purposes, and to
do, at Secured Party's option and Grantor's expense, at any time or from time to
time, all acts and things that Secured Party deems necessary to protect,
preserve or realize upon the Collateral and Secured Party's security interest
therein in order to effect the intent of this Agreement, all as fully and
effectively as Grantor might do.

         SECTION 15.  SECURED PARTY MAY PERFORM.  If Grantor fails to perform
                      -------------------------                              
any agreement contained herein within the period provided herein, upon
reasonable notice, Secured Party may itself perform, or cause performance of,
such agreement, and the expenses of Secured Party incurred in connection
therewith shall be payable by Grantor under subsection 10.2 of the Credit
Agreement.

         SECTION 16.  STANDARD OF CARE.  The powers conferred on Secured Party
                      ----------------                                        
hereunder are solely to protect its interest in the Collateral and shall not
impose any duty upon it to exercise any such powers.  Except for the exercise of
reasonable care in the custody of any Collateral in its possession and the
accounting for moneys actually received by it hereunder, Secured Party shall
have no duty as to any Collateral or as to the taking of any necessary steps to
preserve rights against prior parties or any other rights pertaining to any
Collateral.  Secured Party shall be deemed to have exercised reasonable care in
the custody and preservation of Collateral in its possession if such Collateral
is accorded treatment substantially equal to that which Secured Party accords
its own property.

         SECTION 17.  REMEDIES.  If any Event of Default shall have occurred and
                      --------                                                  
be continuing, Secured Party may exercise in respect of the Collateral, in
addition to all other rights and remedies provided for herein or otherwise
available to it, all the rights and remedies of a secured party on default under
the Uniform Commercial Code as in effect in any relevant jurisdiction (the
"CODE") (whether or not the Code applies to the affected Collateral), and also
may (a) require Grantor to, and Grantor hereby agrees that it will at its
expense and upon request of Secured Party forthwith, assemble all or part of the
Collateral as directed by Secured Party and make it available to Secured Party
at a place to be designated by Secured Party that is reasonably convenient to
both parties, (b) enter onto the property where any Collateral is located and
take possession thereof with or without judicial process, (c) prior to the
disposition of the Collateral, store, process, repair or recondition the
Collateral or otherwise prepare the Collateral for disposition in any manner to
the extent Secured Party deems appropriate, (d) take possession of Grantor's
premises or place

                                       12

 
custodians in exclusive control thereof, remain on such premises and use the
same and any of Grantor's equipment for the purpose of completing any work in
process, taking any actions described in the preceding clause (c) and collecting
any Secured Obligation, and (e) without notice except as specified below, sell
the Collateral or any part thereof in one or more parcels at public or private
sale, at any of Secured Party's offices or elsewhere, for cash, on credit or for
future delivery, at such time or times and at such price or prices and upon such
other terms as Secured Party may deem commercially reasonable.  Secured Party or
any Lender or Interest Rate Exchanger may be the purchaser of any or all of the
Collateral at any such public sale and, to the extent permitted by law, private
sale, and Secured Party, as agent for and representative of Lenders and Interest
Rate Exchangers (but not any Lender or Lenders or Interest Rate Exchanger or
Interest Rate Exchangers in its or their respective individual capacities unless
Requisite Obligees (as defined in Section 20(a)) shall otherwise agree in
writing), shall be entitled, for the purpose of bidding and making settlement or
payment of the purchase price for all or any portion of the Collateral sold at
any such public sale, to use and apply any of the Secured Obligations as a
credit on account of the purchase price for any Collateral payable by Secured
Party at such sale.  Each purchaser at any such sale shall hold the property
sold absolutely free from any claim or right on the part of Grantor, and Grantor
hereby waives (to the extent permitted by applicable law) all rights of
redemption, stay and/or appraisal which it now has or may at any time in the
future have under any rule of law or statute now existing or hereafter enacted.
Grantor agrees that, to the extent notice of sale shall be required by law, at
least ten days' notice to Grantor of the time and place of any public sale or
the time after which any private sale is to be made shall constitute reasonable
notification.  Secured Party shall not be obligated to make any sale of
Collateral regardless of notice of sale having been given.  Secured Party may
adjourn any public or private sale from time to time by announcement at the time
and place fixed therefor, and such sale may, without further notice, be made at
the time and place to which it was so adjourned.  Grantor hereby waives any
claims against Secured Party arising by reason of the fact that the price at
which any Collateral may have been sold at such a private sale was less than the
price which might have been obtained at a public sale, even if Secured Party
accepts the first offer received and does not offer such Collateral to more than
one offeree.  If the proceeds of any sale or other disposition of the Collateral
are insufficient to pay all the Secured Obligations, Grantor shall be liable for
the deficiency and the fees of any attorneys employed by Secured Party to
collect such deficiency.

         SECTION 18.  APPLICATION OF PROCEEDS.  Except as expressly provided
                      -----------------------                               
elsewhere in this Agreement, all proceeds received by Secured Party in respect
of any sale of, collection from, or other realization upon all or any part of
the Collateral shall be applied as provided in subsection 2.4D of the Credit
Agreement.

                                       13

 
         SECTION 19.  CONTINUING SECURITY INTEREST; TRANSFER OF LOANS.  This
                      -----------------------------------------------       
Agreement shall create a continuing security interest in the Collateral and
shall (a) remain in full force and effect until the payment in full of the
Secured Obligations, the cancellation or termination of the Commitments and the
cancellation or expiration of all outstanding Letters of Credit, (b) be binding
upon Grantor, its successors and assigns, and (c) inure, together with the
rights and remedies of Secured Party hereunder, to the benefit of Secured Party
and its successors, transferees and assigns.  Without limiting the generality of
the foregoing clause (c), but subject to the provisions of subsection 10.1 of
the Credit Agreement, any Lender may assign or otherwise transfer any Loans held
by it to any other Person, and such other Person shall thereupon become vested
with all the benefits in respect thereof granted to Lenders herein or otherwise.
Upon the payment in full of all Secured Obligations, the cancellation or
termination of the Commitments and the cancellation or expiration of all
outstanding Letters of Credit, the security interest granted hereby shall
terminate and all rights to the Collateral shall revert to Grantor.  Upon any
such termination Secured Party will, at Grantor's expense, execute and deliver
to Grantor such documents as Grantor shall reasonably request to evidence such
termination.

         SECTION 20.  SECURED PARTY AS ADMINISTRATIVE AGENT.
                      ------------------------------------- 

         (a) Secured Party has been appointed to act as Secured Party hereunder
by Lenders and, by their acceptance of the benefits hereof, Interest Rate
Exchangers.  Secured Party shall be obligated, and shall have the right
hereunder, to make demands, to give notices, to exercise or refrain from
exercising any rights, and to take or refrain from taking any action (including
the release or substitution of Collateral), solely in accordance with this
Agreement and the Credit Agreement; provided that Secured Party shall exercise,
                                    --------                                   
or refrain from exercising, any remedies provided for in Section 17 in
accordance with the instructions of (i) Requisite Lenders or (ii) after payment
in full of all Obligations under the Credit Agreement and the other Loan
Documents, the holders of a majority of the aggregate notional amount (or, with
respect to any Lender Interest Rate Agreement that has been terminated in
accordance with its terms, the amount then due and payable (exclusive of
expenses and similar payments but including any early termination payments then
due) under such Lender Interest Rate Agreement) under all Lender Interest Rate
Agreements (Requisite Lenders or, if applicable, such holders being referred to
herein as "REQUISITE OBLIGEES").  In furtherance of the foregoing provisions of
this Section 20(a), each Interest Rate Exchanger, by its acceptance of the
benefits hereof, agrees that it shall have no right individually to realize upon
any of the Collateral hereunder, it being understood and agreed by such Interest
Rate Exchanger that all rights and remedies hereunder may be exercised solely by
Secured Party for the benefit of Lenders and Interest Rate Exchangers in
accordance with the terms of this Section 20(a).

                                       14

 
         (b) Secured Party shall at all times be the same Person that is
Administrative Agent under the Credit Agreement.  Written notice of resignation
by Administrative Agent pursuant to subsection 9.5 of the Credit Agreement shall
also constitute notice of resignation as Secured Party under this Agreement;
removal of Administrative Agent pursuant to subsection 9.5 of the Credit
Agreement shall also constitute removal as Secured Party under this Agreement;
and appointment of a successor Administrative Agent pursuant to subsection 9.5
of the Credit Agreement shall also constitute appointment of a successor Secured
Party under this Agreement.  Upon the acceptance of any appointment as
Administrative Agent under subsection 9.5 of the Credit Agreement by a successor
Administrative Agent, that successor Administrative Agent shall thereupon
succeed to and become vested with all the rights, powers, privileges and duties
of the retiring or removed Secured Party under this Agreement, and the retiring
or removed Secured Party under this Agreement shall promptly (i) transfer to
such successor Secured Party all sums, securities and other items of Collateral
held hereunder, together with all records and other documents necessary or
appropriate in connection with the performance of the duties of the successor
Secured Party under this Agreement, and (ii) execute and deliver to such
successor Secured Party such amendments to financing statements, and take such
other actions, as may be necessary or appropriate in connection with the
assignment to such successor Secured Party of the security interests created
hereunder, whereupon such retiring or removed Secured Party shall be discharged
from its duties and obligations under this Agreement.  After any retiring or
removed Administrative Agent's resignation or removal hereunder as Secured
Party, the provisions of this Agreement shall inure to its benefit as to any
actions taken or omitted to be taken by it under this Agreement while it was
Secured Party hereunder.

         SECTION 21.  AMENDMENTS; ETC.  No amendment, modification, termination
                      ---------------                                          
or waiver of any provision of this Agreement, and no consent to any departure by
Grantor therefrom, shall in any event be effective unless the same shall be in
writing and signed by Secured Party and, in the case of any such amendment or
modification, by Grantor.  Any such waiver or consent shall be effective only in
the specific instance and for the specific purpose for which it was given.

         SECTION 22.  NOTICES.  Any notice or other communication herein
                      -------                                           
required or permitted to be given shall be in writing and may be personally
served, telexed or sent by telefacsimile or United States mail or courier
service and shall be deemed to have been given when delivered in person or by
courier service, upon receipt of telefacsimile or telex, or three Business Days
after depositing it in the United States mail with postage prepaid and properly
addressed.  For the purposes hereof, the address of each party hereto shall be
as provided in subsection 10.8 of the Credit Agreement.

                                       15

 
         SECTION 23.  SEVERABILITY.  In case any provision in or obligation
                      ------------                                         
under this Agreement shall be invalid, illegal or unenforceable in any
jurisdiction, the validity, legality and enforceability of the remaining
provisions or obligations, or of such provision or obligation in any other
jurisdiction, shall not in any way be affected or impaired thereby.

         SECTION 24.  HEADINGS.  Section and subsection headings in this
                      --------                                          
Agreement are included herein for convenience of reference only and shall not
constitute a part of this Agreement for any other purpose or be given any
substantive effect.

         SECTION 25.  GOVERNING LAW; TERMS.  THIS AGREEMENT AND THE RIGHTS AND
                      --------------------                                    
OBLIGATIONS OF THE PARTIES HEREUNDER SHALL BE GOVERNED BY, AND SHALL BE
CONSTRUED AND ENFORCED IN ACCORDANCE WITH, THE INTERNAL LAWS OF THE STATE OF NEW
YORK (INCLUDING SECTION 5-1401 OF THE GENERAL OBLIGATIONS LAW OF THE STATE OF
NEW YORK), WITHOUT REGARD TO CONFLICTS OF LAWS PRINCIPLES, EXCEPT TO THE EXTENT
THAT THE CODE PROVIDES THAT THE PERFECTION OF THE SECURITY INTEREST HEREUNDER,
OR REMEDIES HEREUNDER, IN RESPECT OF ANY PARTICULAR COLLATERAL ARE GOVERNED BY
THE LAWS OF A JURISDICTION OTHER THAN THE STATE OF NEW YORK.  Unless otherwise
defined herein or in the Credit Agreement, terms used in Articles 8 and 9 of the
Uniform Commercial Code in the State of New York are used herein as therein
defined.

         SECTION 26.  COUNTERPARTS.  This Agreement may be executed in one or
                      ------------                                           
more counterparts and by different parties hereto in separate counterparts, each
of which when so executed and delivered shall be deemed an original, but all
such counterparts together shall constitute but one and the same instrument;
signature pages may be detached from multiple separate counterparts and attached
to a single counterpart so that all signature pages are physically attached to
the same document.


                  [Remainder of page intentionally left blank]

                                       16

 
       IN WITNESS WHEREOF, Grantor and Secured Party have caused this Agreement
to be duly executed and delivered by their respective officers thereunto duly
authorized as of the date first written above.


                             THE PANTRY, INC., as Grantor



                             By: /s/ WILLIAM T. FLYG
                                 -------------------
                               Title: Senior V.P.


                             FIRST UNION NATIONAL BANK, as Secured Party



                             By: /s/ MARK FELKER
                                 ---------------
                               Title: Senior V.P.


                                      S-1