EXHIBIT 10.7
                                                                    ------------
                         TAX INDEMNIFICATION AGREEMENT

          This Tax Indemnification Agreement (this "Agreement"), is entered into
this 15th day of October, 1997, by and between HEADLANDS MORTGAGE COMPANY, a
California corporation ("Headlands"), THE JESSICA M. PAUL IRREVOCABLE TRUST, THE
JESSICA M. PAUL GRANTOR TRUST, PETER T. PAUL LIVING TRUST, and JESSICA M. PAUL,
an individual (collectively the "Paul Shareholders") and DENNIS M. HART,
KATHERINE E. HART, D. MICHAEL HART, JR., ELIZABETH A. HART and CHRISTOPHER K.
HART (collectively, the "Hart Shareholders").  The Paul Shareholders and the
Hart Shareholders are collectively referred to as the "Shareholders" or
individually "Shareholder".

                                   Recitals
                                   --------

          WHEREAS, Headlands was and will be an S corporation within the meaning
of Section 1361 of the Internal Revenue Code of 1986, as amended (the "Code"),
and the corresponding provisions of state income tax law, for the period from
inception of operations in 1986 through the closing date (the "Closing Date") of
the Headlands initial public offering (the "S Period");

          WHEREAS, immediately prior to the Closing Date the Shareholders held
all the outstanding shares of common stock of Headlands (the "Common Stock"),
which comprised the only class of capital stock of Headlands outstanding;

          WHEREAS, Headlands will be a C corporation within the meaning of
Section 1361 of the Code and the corresponding provisions of state income tax
law from the Closing Date and thereafter;

          WHEREAS, if Headlands completes an initial public offering and a tax
audit increases or decreases the taxable income or non deductible items from
Headlands allocated to any Shareholder, the parties intend that, if such audit
results in a larger allocation of income or non deductible items to any
Shareholder, Headlands shall make a distribution to such Shareholder to offset
the tax payable as a result of such allocation and, if such audit results in a
reduced allocation of income or non-deductible items to any Shareholder, such
Shareholder will repay to Headlands the amount of any distribution Headlands
made to such Shareholder to permit such Shareholder to pay the prior tax.

                                   Agreement
                                   ---------

          NOW, THEREFORE, in consideration of the premises and of the mutual
agreements contained herein, the parties hereto agree as follows:

 
          1.   Contingent Effective Date.  This Agreement shall only become
               -------------------------                                   
effective upon the successful completion of an initial public offering by
Headlands.
 
          2.   Representations, Warranties and Covenants of the Paul
               -----------------------------------------------------
Shareholders.  The Paul Shareholders jointly and severally represent and warrant
- ------------                                                                    
to Headlands that:

               (a)  During the S Period, the Paul Shareholders duly and timely
filed all tax reports and returns required to be filed by them and shall duly
and timely file all tax reports and returns required to be filed by them for any
future tax year in the S period ("Paul Shareholder Tax Returns").

               (b)  The Paul Shareholders, to the best of their knowledge, have
duly included, or will duly include, in their Paul Shareholder Tax Returns their
allocable share of Headlands' taxable income from all sources through and
including the last business day of the S Period (the "S Corporation Taxable
Income") as reported to them on IRS Form K-1 issued by Headlands to each Paul
Shareholder.

               (c)  To the best of each Paul Shareholder's knowledge there are
no pending audits, inquiries, investigations or examinations relating to any of
the Paul Shareholder Tax Returns, and there are no claims which have been
asserted relating to any of the Paul Shareholder Tax Returns which if determined
adversely would result in the assertion by any entity of the federal government
or California State government of any federal or California State income tax
("Tax") deficiency against Headlands.

          3.   Representations, Warranties and Covenants of the Hart
               -----------------------------------------------------
Shareholders.  The Hart Shareholders jointly and severally represent and warrant
- ------------                                                                    
to Headlands that:

               (a)  During the S Period, the Hart Shareholders duly and timely
filed all tax reports and returns required to be filed by them and shall duly
and timely file all tax reports and returns required to be filed by them for any
future tax year in the S period ("Hart Shareholder Tax Returns").

               (b)  The Hart Shareholders, to the best of their knowledge, have
duly included, or will duly include, in their Hart Shareholder Tax Returns their
allocable share of S Corporation Taxable Income as reported to them on IRS Form
K-1 issued by Headlands to each Hart Shareholder.

               (c)  To the best of each Hart Shareholder's knowledge there are
no pending audits, inquiries, investigations or examinations relating to any of
the Hart Shareholder Tax Returns, and there are no claims which have been
asserted relating to any of the Hart Shareholder Tax Returns which if determined
adversely 

 
would result in the assertion by any entity of the federal government or
California State government of any Tax deficiency against Headlands.

          4.   Representations, Warranties and Covenants of Headlands.
               ------------------------------------------------------  
Headlands represents and warrants to the Shareholders that, to the best of its
knowledge and except for an audit of the tax years 1993 and 1994, there are no
pending audits, inquiries, investigations or examinations relating to any of the
Paul Shareholder Tax Returns or the Hart Shareholder Tax Returns or any tax
return of Headlands, and that there are no claims which have been asserted
relating to any of the Paul Shareholder Tax Returns or the Hart Shareholders Tax
Returns or any tax return of Headlands which if determined adversely would
result in the assertion by any entity of the federal government or California
state government of any federal or California state income tax deficiency
against a Shareholder or Shareholders.

          5.   Indemnifications By Shareholders.
               -------------------------------- 

               (a)  The Paul Shareholders, jointly and severally, shall be
responsible for and shall indemnify and save and hold harmless Headlands against
all Tax (including interest and penalties and related costs and expenses)
imposed on Headlands resulting from a final determination of an adjustment to
any Paul Shareholders' taxable income resulting in a decrease in any Paul
Shareholders' S Corporation Taxable Income and a corresponding decrease in
Headlands' taxable income (whether with respect to the same tax year for which
the adjustment is made or over future tax years) and such Paul Shareholders had
received a distribution from Headlands relating to the prior overpayment of tax
by such Paul Shareholder.

               (b)  The Hart Shareholders, jointly and severally, shall be
responsible for and shall indemnify and save and hold harmless Headlands against
all Tax (including interest and penalties and related costs and expenses)
imposed on Headlands resulting from a final determination of an adjustment to
any Hart Shareholders' taxable income resulting in a decrease in the Hart
Shareholders' S Corporation Taxable Income and a corresponding decrease in
Headlands' taxable income (whether with respect to the same tax year for which
the adjustment is made or over future tax years) and such Hart Shareholder had
received distribution from Headlands relating to the prior overpayment of tax by
such Paul Shareholder.

          6.   Indemnifications By Headlands.  If after Headlands has filed its
               -----------------------------                                   
federal or state tax return there is a final determination of an adjustment to
Headlands' taxable income for any tax year during the S Period resulting in an
increase in such Shareholder's S Corporation Taxable Income and a decrease in
Headland's taxable income (whether with respect to the same tax year for which
the adjustment is made or over future tax years) (the "Increase In Income"),
Headlands shall indemnify and save and hold harmless each Shareholder from and
against all Tax imposed (including interest and penalties and related costs and
expenses) on each such Shareholder 

                                       3

 
resulting from such Increase In Income. Further, Headlands shall indemnify and
hold harmless the Shareholders from and against Tax incurred by such
Shareholders resulting from the receipt of any indemnification payments made to
such Shareholders pursuant to the foregoing sentence. Notwithstanding the
foregoing, the total indemnity provided by Headlands to the Shareholders by this
Paragraph 6 shall not exceed the amount of the deferred tax liability which may
be recorded on the balance sheet of Headlands upon termination of the S
corporation status.

          7.   Time For Payments.  The Shareholders or Headlands, as the case
               -----------------                                             
may be, shall make any payment required under this Agreement within thirty (30)
days after receipt of notice from the other party that a payment is due by such
party to the appropriate taxing authority.  Any such payment not so made shall
thereafter bear interest at the rate of 10% per annum.

          8.   Deferred Tax Liability.  Notwithstanding the foregoing, the
               ----------------------                                     
Shareholders shall not be responsible for any portion of any deferred tax
liability which may be recorded on the balance sheet of Headlands upon
termination of the S corporation status.

          9.   Notice.  All notices and other communications made in connection
               ------                                                          
with this Agreement shall be in writing and shall be deemed given when delivered
personally or sent by facsimile transmission to the numbers indicated below (if
physical confirmation of transmission is retained) or on the third succeeding
business day after being mailed by registered or certified mail, deposited in
the United States mail, postage prepaid, return receipt requested, to the
appropriate party at its, his or her address below or at such other address for
such party (as shall be specified by written notice when in fact delivered
pursuant hereto):

               If to Headlands, at:

                    Headlands Mortgage Company
                    700 Larkspur Landing Circle
                    Suite 250
                    Larkspur, CA  94939

                    Attn: Peter T. Paul

               If to the Paul Shareholders, at:

                    Peter T. Paul
                    Headlands Mortgage Company
                    700 Larkspur Landing Circle
                    Suite 250
                    Larkspur, CA  94939

                                       4

 
               If to the Hart Shareholders, at

                    Hart Shareholders
                    c/o J. Michael Shepherd
                    Brobeck, Phleger & Harrison LLP
                    Spear Street Tower
                    One Market Street
                    San Francisco, CA  94105

          10.  Enforceability; Consent to Jurisdiction.  The rights of the
               ---------------------------------------                    
parties under this Agreement shall be enforceable only in the state courts of
the State of California.  Each of the parties irrevocably consents to the
jurisdiction of the courts of the State of California for all purposes in
connection with any action or proceedings which arises out of or relates to this
Agreement and each party agrees that any action instituted under this Agreement
shall be brought only in the state courts of the State of California.

          11.  Choice of Law.  This Agreement shall be governed by, and the
               -------------                                               
provisions of this Agreement shall be construed in accordance with, the laws of
the State of California as applied to contracts between California residents
entered into and to be performed entirely within California.

          12.  Amendment.   No amendment, modification, termination or
               ---------                                              
cancellation of this Agreement shall be effective unless made in a writing
signed by each of the parties to this Agreement.

          13.  Successors and Assigns.  This Agreement shall be binding upon
               ----------------------                                       
each of the parties to this Agreement and their respective successors, and shall
inure to the benefit of each of the parties and their successors, estates, heirs
and legal representatives.  The rights and obligations under this Agreement may
not be assigned without the prior written consent of all the parties.

          14.  Attorneys' Fees.  In the event that any action is instituted by a
               ---------------                                                  
party under this Agreement to enforce or interpret any of the terms of this
Agreement, the prevailing party shall be entitled to be paid all court costs and
expenses, including reasonable attorneys' fees, incurred with respect to such
action.

          15.  Counterparts.  This Agreement may be executed in one or more
               ------------                                                
counterparts, each of which shall constitute an original.

          16.  Severability.  Any provision of this Agreement that is prohibited
               ------------                                                     
or unenforceable in any jurisdiction shall, as to such jurisdiction, be
ineffective to the

                                       5

 
extent of such prohibition or unenforceability without invalidating the
remaining provisions hereof.

          IN WITNESS WHEREOF, the parties have executed this Agreement in San
Francisco, California, as of this 15th day of October, 1997.

                         "HEADLANDS"

                         HEADLANDS MORTGAGE COMPANY



                         By_______________________________________
                              PETER T. PAUL, President


                         "PAUL SHAREHOLDERS"

                         THE JESSICA M. PAUL IRREVOCABLE
                         TRUST



                         By_______________________________________
                              DANIEL W. PAUL, as Trustee of the 
                              Jessica M. Paul Irrevocable Trust dated 
                              May 21, 1997


                         THE JESSICA M. PAUL GRANTOR TRUST



                         By______________________________________
                              GILBERT J. MACQUARRIE, as Trustee 
                              of the Jessica M. Paul Grantor Trust dated 
                              May 21, 1997



                       [Signatures Continued on Page 7]

                                       6

 
                      [Signatures Continued from Page 6]


                         PETER T. PAUL LIVING TRUST



                         By______________________________________
                              PETER T. PAUL, as Trustee of the 
                              Peter T. Paul Living Trust dated 
                              May 21, 1997



                         ________________________________________
                              JESSICA M. PAUL



                         "HART SHAREHOLDERS"



                         ________________________________________
                              DENNIS M. HART



                         ________________________________________
                              KATHERINE E. HART



                         ________________________________________
                              D. MICHAEL HART, JR.



                         ________________________________________
                              ELIZABETH A. HART



                         ________________________________________
                              CHRISTOPHER K. HART

                                       7