<PAGE>

                                                                   EXHIBIT 10 JJ
                          AGREEMENT AND GENERAL RELEASE

          This is an Agreement and General Release (Agreement) between
Mercantile Bankshares Corporation (the "Corporation"), Mercantile-Safe Deposit &
Trust Company (the Bank) and Alan D. Yarbro (Mr. Yarbro). The parties agree as
follows:

          1. The Bank agrees that it will make bi-weekly severance payments to
Mr. Yarbro, based on his current regular annual salary rate, which is
$300,000.00, less all lawful deductions, for the period July 1, 2002 through
December 31, 2002.

          2. The Bank agrees to provide Mr. Yarbro his current level of benefits
through December 31, 2002. The Bank will provide these benefits to Mr. Yarbro in
the following areas: dental coverage, medical coverage, medical reimbursement
plan, life insurance coverage, thrift plan, pension plan, employee assistance
program, blood program, parking and checking account benefits. The parties agree
that payments for benefits and premiums for benefit coverage will continue to be
made in the same manner as prior to this Agreement, and that allowable
deductions from Mr. Yarbro's pay shall be made for such payments. The parties
further agree that the Bank and Mr. Yarbro will continue to make payments for
benefits and benefit premiums in substantially the same proportion as before
this Agreement.

          3. The Bank agrees to pay Mr. Yarbro the sum of Fifty-Two Thousand
Dollars ($52,000.00) in a lump sum payment, less all lawful deductions, as soon
as practicable after December 31, 2002.

          4. The Bank agrees that it will provide Mr. Yarbro the title, free and
clear of any liens, to the automobile (1996 Toyota Camry) the Bank currently
provides for his use. The Bank will be responsible for any transfer or other
taxes incurred in this transfer of title. The Bank will cease insurance coverage
on the vehicle on July 15, 2002; Mr. Yarbro will be responsible for insurance
coverage for the vehicle after that date. In addition, the Bank will cease all
travel and accidental coverage applicable to Mr. Yarbro as of June 30, 2002.

<PAGE>

          5. With respect to the Supplemental Cash Balance Pension Plan and the
Supplemental Thrift Plan (SERPs), Mr. Yarbro shall remain eligible to
participate, in accordance with the SERPs' terms, through December 31, 2002. He
shall receive payment for the amounts vested in the SERPs as of December 31,
2002, and any accrued interest thereon, less all lawful deductions, as soon as
practicable after December 31, 2002.

          6. With respect to the Mercantile Bankshares Corporation and
Affiliates' Annual Incentive Compensation Plan, Mr. Yarbro shall continue as a
Class II participant in the Plan, through December 31, 2002, with any award
thereunder to be paid by March 31, 2003.

          7. With respect to the Mercantile Bankshares Corporation Omnibus Stock
Plan, Mr. Yarbro shall be vested in the stock options which have become
exercisable prior to the execution of this Agreement, and he shall be entitled
to exercise such options as provided in the Plan and his Stock Options
Agreements.

          8. Mr. Yarbro agrees that the benefits listed in paragraphs 1 through
4 are not benefits to which he is otherwise entitled by reason of his
employment. The Parties agree that Mr. Yarbro shall be entitled to all benefits
provided for herein, notwithstanding any other employment he may obtain.

          9. Mr. Yarbro agrees that, in consideration of the promises set forth
in paragraphs 1 through 7, he will, and hereby does, forever and irrevocably
release and discharge the Bank, its officers, directors, employees, agents,
parents (including Mercantile Bankshares Corporation), subsidiaries, affiliates,
predecessors, successors, purchasers, assigns, and representatives, of any and
all grievances, claims, demands, debts, defenses, actions or causes of action,
obligations, damages, and liabilities whatsoever which he now has, has had, or
may have, whether the same be at law, in equity, or mixed, in any way arising
from or relating to any act, occurrence, or transaction before the date of this
Agreement. This is a General Release. Mr. Yarbro expressly acknowledges that
this General Release includes, but is not limited to, Mr. Yarbro's intent to
release the Bank from any claim of age, race, sex, religion, national origin or
any other claim of employment discrimination under the Age Discrimination

                                      -2-

<PAGE>

in Employment Act (29 U.S.C.(S)2000 et seq.), the Employee Retirement Income
Security Act (29 U.S.C.(S)1001 et seq.), Article 49B of the Maryland Annotated
Code, and any other law prohibiting employment discrimination.

          10. Mr. Yarbro agrees not to sue the Bank or to join in any lawsuit
against the Bank, or any other person or entity specified in paragraph 9,
concerning any matter which arose on or before the date of this Agreement.

          11. Mr. Yarbro agrees that he shall not be regarded as the prevailing
party for any purpose, including, but not limited to, determining responsibility
for or entitlement to attorneys' fees, under any statute or otherwise.

          12. The parties agree that Mr. Yarbro shall, effective June 30, 2002,
resign from his position as Secretary of the Bank and the Corporation and shall
no longer be an officer or executive of the Bank or the Corporation; thereafter,
he will have no executive responsibilities, but will be available for
consultation until January 1, 2003, at which time his employment with the Bank
and the Corporation will terminate. The Executive Severance Agreement, dated
April 24, 1996, between the Corporation, the Bank and Mr. Yarbro, will terminate
on June 30, 2002.

          13. Mr. Yarbro understands that he has twenty-one (21) days from his
receipt of this Agreement to consider his decision to sign it. By signing this
Agreement, Mr. Yarbro expressly acknowledges that his decision to sign this
Agreement was of his own free will.

          14. Mr. Yarbro understands that he may revoke this Agreement for up to
and including seven (7) days after his execution of the Agreement, and that the
Agreement shall not become effective until the expiration of seven days from its
execution, the effective date of this Agreement.

          15. Mr. Yarbro has been advised by the Bank to consult an attorney
regarding the terms of this Agreement before signing it.

          16. Mr. Yarbro expressly acknowledges and understands that this
Agreement is not an admission of liability under any statute or otherwise by the
Bank, and does not admit any violation of Mr. Yarbro's legal rights, but is
solely entered into as an exchange for the terms described above.

                                      -3-

<PAGE>

          17. The parties agree that this Agreement shall be binding upon and
inure to the benefit of the assigns, heirs, executors, and administrators of Mr.
Yarbro and the Bank, its officers, directors, employees, agents, parents
(including Mercantile Bankshares Corporation), subsidiaries, affiliates,
predecessors, successors, purchasers, assigns, and representatives, that this
Agreement contains the entire agreement and understanding of the parties, that
there are no additional promises or terms among the parties other than those
contained herein, and that this Agreement shall not be modified except in
writing signed by each of the parties.

          18. This Agreement shall in all respects be interpreted, enforced, and
governed under the laws of the State of Maryland. The language of all parts of
this Agreement shall in all cases be construed as a whole, according to its fair
meaning, and not strictly for or against any of the parties.

          19. Mr. Yarbro represents that he has read this Agreement, that he
understands all of its terms, and that he enters into this Agreement voluntarily
and with knowledge of its effect.



     June 18, 2002                  /s/ Alan D. Yarbro
---------------------------         --------------------------------------------
Date                                Alan D. Yarbro

     June 18, 2002                  Mercantile Bankshares Corporation
---------------------------
Date

                                    By: /s/ Edward J. Kelly, III
                                        ----------------------------------------

                                    Title: President and Chief Executive Officer
                                           -------------------------------------

     June 18, 2002                  Mercantile-Safe Deposit &
---------------------------
Date                                Trust Company

                                    By: /s/ Edward J. Kelly, III
                                        -------------------------------

                                    Title: Chairman and Chief Executive Officer
                                          --------------------------------------

                                       -4-