<PAGE>   1
                                                                  EXHIBIT 10.31

                               SERVICES AGREEMENT


     AGREEMENT, dated as of February 1, 1997 between GETTY REALTY CORP., a
Delaware corporation ("Realty"), and GETTY PETROLEUM MARKETING INC., a Maryland
corporation ("Marketing").

                                    SUMMARY

     Pursuant to a Reorganization and Distribution Agreement dated as of
__________,1997, (the "Distribution Agreement") between Realty and Marketing,
Realty is on the date hereof transferring  to Marketing the Marketing Assets
and Marketing Business (as such terms are defined in the Distribution
Agreement) in anticipation of a distribution by Realty of the common stock of
Marketing to the stockholders of Realty.  A condition of the closing of the
transactions contemplated by the Distribution Agreement is that Realty and
Marketing enter into a services agreement pursuant to which Marketing shall
provide certain services as agent for Realty and Realty shall provide certain
services as agent for Marketing.

     NOW, THEREFORE, in consideration of the foregoing premises and the mutual
covenants hereinafter set forth, and intending to be legally bound hereby, the
parties agree as follows:

     1.   MARKETING SERVICES.  Marketing agrees, as agent for Realty, to utilize
its employees and assets to provide certain services consistent with the type,
quality and level of such services required by Realty and provided by Getty
Petroleum Corp. immediately prior to the date hereof, in connection therewith.
The services to be provided are set forth below, together with the applicable
monthly charge for each such service:


<TABLE>
<CAPTION>
                   SERVICES                    MONTHLY CHARGE
                   --------------------------  --------------
                   <S>                         <C>
                   Financial Reporting         $ 9,300.00
                   Accounting/Payroll          $11,700.00
                   Data Processing/Computer    $11,600.00
                   Tax                         $ 5,600.00
                   Legal                       $15,600.00
                   Treasury                    $ 4,600.00
                   Office Services             $ 2,300.00
                   Human Resources             $ 3,200.00
                   Engineering/Environmental   $ 7,900.00
                   Investor Relations          $ 3,900.00
                   Purchasing                  $   700.00
                   Servicing of Non-Petroleum
                    Class "137 " Leases        $ 5,500.00
</TABLE>




     2. INVOICE AND PAYMENT.  Marketing shall invoice Realty once each month
for the services performed during the prior month and Realty shall pay
Marketing for such services not later than ten (10) days from the receipt of
invoice.  The amount paid shall be net of the amount owing to Realty under
Paragraphs 3 and 4.

     3. REALTY SERVICES.   Realty agrees that as agent for Marketing (i) Realty
will act as the permittee or licensee under all permits and licenses until such
time(s) as all permits and licenses are either 


                                      1
<PAGE>   2

transferred to Marketing or new ones are issued therefor; (ii) Realty will
continue to act as the party at interest in all instances where contracts,
leases or the like are not assignable to Marketing or Realty has been unable to
obtain consent to assignment where consent is required; and (iii) Realty will
draw on all electronic funds transfer authorizations ("EFT") issued by third
parties to Realty and letters of credit in favor of Realty (collectively
hereinafter "draws") until such time as new EFT agreements and letters of
credit are issued, all for the benefit of Marketing.   Marketing (x) will
reimburse Realty for any out-of-pocket expenses it may incur in performing such
services, and (y) will defend, indemnify and hold harmless Realty in the event
that any such draws made at Marketing's direction result in claims for damages
for wrongful draws made under clause (iii) above.  The services to be provided
are set forth below together with the applicable monthly charge for each such
service.


<TABLE>
<CAPTION>
Services                                          Monthly Charge
------------------------------------------------  --------------
<S>                                                   <C>       
Servicing of Permits and Licenses                     $700.00   
Servicing of Non-Assignable Contracts and Leases      $700.00   
Servicing of EFT Transfers and Letters of Credit      $500.00   
</TABLE>                                                                       


     4. OUTSIDE SERVICES; ADJUSTMENTS TO CHARGES.   The charges for the
foregoing services to be performed hereunder shall be all-inclusive of supplies
and utilities required for such services, provided, however, that, if the level
of activity for any service should increase above  the level required prior to
the date hereof, the party providing such service (the "providing party") shall
have the right to charge the other party for the additional supplies and
utilities being used, on a cost-plus 10% basis.  In the event that the
providing party is required to retain outside consultant/contractor assistance
to perform any of the services hereunder, the providing party shall first
obtain the consent of the other party to such retention and the other party
shall pay directly the fees of such consultant/contractor.  The providing party
shall not be held responsible for the performance of such consultant/contractor
services and the other party assumes the risk thereof.  At any time the other
party desires reports, software, files or the like, the providing party shall
provide them to the other party at cost.

The services to be performed hereunder shall be performed and used in
compliance with the applicable provisions of the Distribution Agreement.

The parties hereto agree that once every six (6) months they will review the
foregoing monthly charges and, if it is mutually determined in good faith that
certain monthly charge(s) do not correctly compensate the providing party for
the service(s) rendered, the monthly charge(s) shall be increased or reduced,
as the case may be.

     5. CONTRACTUAL RELATIONSHIP.  The relationship between Realty and
Marketing under this Agreement shall be that of principal and agent in respect
of the services to be performed hereunder.  In no event is the relationship of
the parties intended to be that of employer and employee and in no event is
either party to be deemed or purported to be the partner or joint venturer of
the other for any purpose whatsoever.

     6. TERM.    The term of this Agreement shall be two (2) years from the
date hereof, provided, however, that, upon one hundred and twenty (120) days
notice (i) to Realty, Marketing shall have the right to terminate any or all of
the services set forth in Paragraph 1; and (ii) to Marketing, Realty shall have
the right to terminate any or all of the services set forth in Paragraph 3.  In
the event of partial termination, the monthly charge for such terminated
service shall cease upon the effective date of the partial termination.  Realty
understands and agrees that certain services (e.g. Data Processing) cannot be
terminated if other services (e.g. Accounting ) are to continue and that
"Office Services" cannot be terminated while Realty is subleasing office


                                      2
<PAGE>   3

space in the Jericho Building.  Upon the termination of all services,
payment therefor and payment of all consultants/contractors, this Agreement
shall terminate.

     7. LIMITATION OF LIABILITY.   Neither party shall have any liability
whatsoever to the other party or to any third party for any loss, liability,
damage, cost or deficiency (collectively  "Losses"), or for any claim for
Losses, including, without limitation, Losses or claims for personal injury,
death or property damage, warranty, tort or products liability, resulting from,
caused by or arising out of a party's performance under this Agreement except
for claims arising out of the negligence or  willful default or breach of such
party hereunder.  In no event shall any party have liability to to the other
party or to any third party for indirect, special or consequential damages or
loss of profits  (except with respect to its willful default or breach), or for
punitive damages for any reason whatsoever.

     8. NOTICES.  All notices and other communications hereunder shall be in
writing and shall be deemed given if delivered personally or by facsimile
transmission, telexed or mailed by overnight delivery service or by registered
or certified mail (return receipt requested), postage prepaid, to the parties
at the following addresses (or at such other address for a party as shall be
specified by like notice; provided that notices of a change of address shall be
effective only upon receipt thereof):

                     (a) if to Getty Realty Corp.:
                         125 Jericho Turnpike
                         Jericho, New York 11753
                         Attention: President

                     (b) if to Getty Petroleum Marketing Inc.:
                         125 Jericho Turnpike
                         Jericho, New York 11753
                         Attention: President

     9.  ASSIGNMENT.  This Agreement and all of the provisions hereof shall be
binding upon and inure to the benefit of the parties hereto and their
respective successors and permitted assigns but neither this Agreement nor any
of the rights, interests or obligations hereunder shall be assigned by any
party hereto without the prior written consent of the other party (other than
to an affiliate of Marketing ).  Any purported assignment in violation of the
provisions hereof shall be void.

     10. GOVERNING LAW.  This Agreement shall be governed by the laws of the
State of New York (regardless of the laws that might otherwise govern under
applicable New York conflict of laws principles) as to all matters, including
but not limited to matters of validity, construction, effect, performance and
remedies.

     11. SUITS IN NEW YORK.  The parties agree that any action or proceeding
relating in any way to this Agreement shall be brought and enforced in the
Supreme Court of the State of New York for Nassau County or the United States
District Court for the Eastern District of New York and the parties hereby
waive any objection to jurisdiction or venue in any such proceeding commenced
in such court.

     12. COUNTERPARTS.  This Agreement may be executed in two or more
counterparts, each of which shall be deemed an original, but all of which
together shall constitute one and the same instrument.

     13. INTERPRETATION.  The article and section headings contained in this
Agreement are solely for the purpose of reference, are not part of the
agreement of the parties and shall not in any way affect the


                                      3
<PAGE>   4

meaning or interpretation of this Agreement.

     14. SEVERANCE.   In the event that any provision of this Agreement is
declared illegal, invalid or unenforceable or contrary to law, it shall not
affect any other provision in the Agreement.

     15. ENTIRE AGREEMENT.  This Agreement embodies the entire agreement and
understanding of the parties hereto in respect of the subject matter hereof.
This Agreement supersedes all prior agreements and understandings between the
parties with respect to the transactions contemplated hereby.

     IN WITNESS WHEREOF, each of Realty and Marketing  has caused this
Agreement to be executed by its duly authorized officer as of the date first
above written.


                           GETTY REALTY CORP.


                      By:  _________________________
                                           President


                           GETTY PETROLEUM MARKETING INC.


                      By:  __________________________
                                            President











                                      4