Exhibit 10.31

SECOND AMENDMENT TOLETTER OF CREDIT AGREEMENT

This SECOND
AMENDMENT TO LETTER OF CREDIT AGREEMENT (this Amendment) 
is made as of the 4th day of December, 2002, by and among PMA CAPITAL
CORPORATION, a Pennsylvania corporation (the Applicant), each
Co-Applicant a party hereto, FLEET NATIONAL BANK, as a Bank under
the Credit Agreement (as defined herein), and FLEET NATIONAL BANK, as agent for
itself and any other Banks (in such capacity, together with its successors and
assigns in such capacity, the Agent), and as issuing bank (in
such capacity, together as with its successors and assigns in such capacity, the
Issuing Bank) for the Letters of Credit (as defined in the
Credit Agreement).

WHEREAS,
the Applicant, the Co-Applicants, the Banks, the Agent, and the Issuing Bank are
parties to a certain Letter of Credit Agreement dated as of December 4, 2001, as
amended by that certain First Amendment to Letter of Credit Agreement dated as
of June 1, 2002 (as further amended and in effect from time to time, the
Credit Agreement);

WHEREAS,
at the request of the Applicant and the Co-Applicants, the other parties to the
Credit Agreement have agreed to amend certain provisions of the Credit Agreement
as more particularly described below;

NOW,
THEREFORE, in consideration of the foregoing, the mutual agreements herein
contained and other good and valuable consideration, the receipt and sufficiency
of which are hereby acknowledged, the parties hereto, intending to be legally
bound, hereby agree as follows:

§1. 
Definitions.All undefined capitalized terms used
herein shall have the meanings ascribed to them in the Credit Agreement.

§2. Amendments to
Credit Agreement. The Credit Agreement is hereby amended as follows:

(a) The
following definitions contained in Section 1.1 of the Credit Agreement are
hereby deleted in their entirety and replaced with the following:

Cash
Coverage Ratio means as of the last day of any period of four
consecutive fiscal quarters (the Measurement Period), the
ratio of:

(i) the
aggregate of (y) the Available Dividend Amount for the Measurement Period for
the Insurance Subsidiaries, other than each Insurance Subsidiary that is a
Subsidiary of another Insurance Subsidiary plus (z) the Net Tax Sharing
Payments (whether a positive or negative number) for the Measurement Period, to

(ii) the
aggregate of (x) Interest Expense incurred during the Measurement Period,
plus (y) Restricted Payments (other than as permitted under Section
7.5(i)) during the Measurement Period, plus (z) the aggregate of all
operating costs and expenses of the Applicant, including rent, utilities and
payroll expenses paid by the Applicant during the Measurement Period.

---

-2-

Contingent
Obligation means, as to any Person (without duplication), any direct
or indirect liability of that Person, whether or not contingent, with or without
recourse, (a) with respect to any Indebtedness, lease, dividend, letter of
credit excluding any letter of credit issued hereunder or other obligation (the
primary obligations) of another Person (the primary
obligor), including (i) to purchase, repurchase or otherwise acquire
such primary obligations or any security therefor, (ii) to advance or
provide funds for the payment or discharge of any such primary obligation, or to
maintain working capital or equity capital of the primary obligor or otherwise
to maintain the net worth or solvency or any balance sheet item, level of income
or financial condition of the primary obligor, (iii) to purchase property,
securities or services primarily for the purpose of assuring the owner of any
such primary obligation of the ability of the primary obligor to make payment of
such primary obligation, or (iv) otherwise to assure or hold harmless the
holder of any such primary obligation against loss in respect thereof (each, a
Guaranty Obligation); (b) with respect to any Surety
Instrument issued for the account of that Person or as to which that Person is
otherwise liable for reimbursement of drawings or payments; or (c) to purchase
any materials, supplies or other property from, or to obtain the services of,
another Person if the relevant contract or other related document or obligation
requires that payment for such materials, supplies or other property, or for
such services, shall be made regardless of whether delivery of such materials,
supplies or other property is ever made or tendered, or such services are ever
performed or tendered, or (d) in respect of any Swap Contract; provided,
however, that, with respect to the Applicant and its Subsidiaries, the
terms Contingent Obligation and Guaranty Obligation shall not include (w)
guarantees or agreements issued by the Applicant to Insurance Regulatory
Authorities pursuant to which the Applicant agrees to maintain the statutory
surplus of PMAIC and MAIC in an amount (in each case) not to exceed $7,500,000,
(x) guarantees or agreements issued by the Applicant to PMAIC pursuant to which
the Applicant agrees to maintain the statutory surplus of PMA Cayman in an
amount not to exceed $15,000,000, (y) endorsements for collection or deposit in
the ordinary course of business or (z) obligations entered into by an Insurance
Subsidiary in the ordinary course of its business under insurance policies or
contracts issued by it or to which it is a party, including reinsurance
agreements (and security posted by any such Insurance Subsidiary in the ordinary
course of its business to secure obligations thereunder so long as such security
consists of letters of credit hereunder or any collateral pursuant to Regulation
114 Trusts.)

Indebtedness
of any Person means, without duplication, (a) all indebtedness for borrowed
money; (b) all obligations issued, undertaken or assumed as the deferred
purchase price of property or services (other than trade payables entered into
in the ordinary course of business on ordinary terms); (c) all
non-contingent reimbursement or payment obligations with respect to Surety
Instruments; (d) all obligations evidenced by notes, bonds, debentures or
similar instruments, including obligations so evidenced incurred in connection
with the acquisition of property, assets or businesses; (e) all
indebtedness created or arising under any conditional sale or other title
retention agreement, or incurred as financing, in either case with respect to
property acquired by the Person (even though the rights and remedies of the
seller or bank under such agreement in the event of default are limited to
repossession or sale of such property);

---

-3-

(f) all obligations with respect to capital leases or Synthetic
Lease Obligations; (g) all obligations with respect to Swap Contracts; (h) all
obligations with respect to (x) any loans made to any executives of the Applicant or any
its Subsidiaries that are guaranteed by the Applicant and (y) any obligations with
respect to repurchase or redemption of shares by the Applicant; (i) all indebtedness
referred to in clauses (a) through (f) above secured by (or for which the holder of such
Indebtedness has an existing right, contingent or otherwise, to be secured by) any Lien
upon or in property (including accounts and contracts rights) owned by such Person, even
though such Person has not assumed or become liable for the payment of such Indebtedness;
and (j) all Contingent Obligations in respect of indebtedness or obligations of others of
the kinds referred to in clauses (a) through (i) above.

Revolving
Credit Agreement shall mean that certain Credit Agreement, dated as of
September 20, 2002, as amended, among the Applicant, the several financial
institutions from time to time party to the Agreement, Fleet National Bank, as
syndication agent, Credit Lyonnais New York Branch, as documentation agent, and
Bank of America, N.A. as administrative agent for the lenders.

Surety
Instruments means all letters of credit (including standby and
commercial but excluding letters of credit in connection with any reinsurance or
insurance arrangement issued hereunder), bankers acceptances, bank
guaranties, shipside bonds, surety bonds and similar instruments.

Swap
Contract means any agreement, whether or not in writing, relating to
any transaction that is a rate swap, basis swap, forward rate transaction,
commodity swap, commodity option, equity or equity index swap or option, bond,
note or bill option, interest rate option, forward foreign exchange transaction,
cap, collar or floor transaction, currency swap, cross-currency rate swap,
swaption, currency option or any other, similar transaction (including any
option to enter into any of the foregoing) or any combination of the foregoing,
and, unless the context otherwise clearly requires, any master agreement
relating to or governing any or all of the foregoing.

Synthetic
Lease Obligations means all monetary obligations of a Person under (a)
a so-called synthetic, off-balance sheet or tax retention lease, or (b) an
agreement for the use or possession of property creating obligations which do
not appear on the balance sheet of such Person but which, upon the insolvency or
bankruptcy of such Person, would be characterized as the Indebtedness of such
Person (without regard to accounting treatment).

Termination
Date means December 4, 2003, or such earlier date on which the
Commitment is terminated.

(b) A new definition of
"Restricted Payments" shall be added to Section 1.1 of the Credit Agreement as follows:

---

-4-

Restricted
Payments has the meaning specified in Section 7.5.

(c) Section 5.3(a) of the
Credit Agreement is hereby deleted in its entirety and replaced with the following

(a)
Concurrently with each delivery of the financial statements described in Sections 5.1 and
5.2, a Compliance Certificate in the form of Exhibit E-1 (in the case of the financial
statements described in Section 5.1) or Exhibit E-2 (in the case of the financial
statements described in Section 5.2) with respect to the period covered by the financial
statements then being delivered, executed by the chief financial officer of the Applicant
(or a vice president of the Applicant having significant responsibility for financial
matters), together, in the case of the financial statements described in Section 5.1,
with a Covenant Compliance Worksheet reflecting the computation of the financial
covenants set forth in Sections 6.1, 6.2 and 6.5 as of the last day of the period covered
by such financial statements, and in the case of the financial statements described in
Section 5.2, with a Covenant Compliance Worksheet reflecting the computation of the
financial covenants set forth in Sections 6.3 and 6.4 as of the last day of the period
covered by such financial statements;

(d) The number
2.75 contained in the first line of Section 6.2 of the Credit
Agreement is hereby deleted and replaced with the number 1.75".

(e) The number
$450,000,000 contained in the second line of Section 6.3 of the
Credit Agreement is hereby deleted and replaced with the number
$500,000,000".

(f) Section 6.4 of the
Credit Agreement is hereby deleted in its entirety and replaced with the following:

6.4. Risk Based Capital.

The
Applicant will not permit total adjusted capital(within the meaning of the
Risk-Based Capital for Insurers Model Act as promulgated by the NAIC as of the date
hereof (the Model Act)) of any Material Insurance Subsidiary domiciled
in the U.S. to be less than one hundred fifty percent (150%) as of the last day of any
fiscal quarter, beginning with the fiscal quarter ending December 31, 2002, of the
applicable Company Action Level RBC(within the meaning of the Model Act) (it
being understood that any calculation, other than at a fiscal year end, shall be based
upon estimates).

(g) The following new
Section 6.5 is hereby added to the Credit Agreement:

6.5. Ratio of Reinsurance Recoverables to Stockholders' Equity.

---

-5-

The
Applicant will not permit the ratio for it and its Subsidiaries on a consolidated basis
of (a) Reinsurance Recoverables to (b) StockholdersEquity, as such terms are
defined in accordance with Generally Accepted Accounting Principles, at any time to
exceed 3.0 to 1.0.

(h) Section 7.1(ii) is
hereby deleted in its entirety and replaced with the following:

(ii)
the Applicant and its Subsidiaries may (x) sell, or otherwise dispose of, the capital
stock or all or any portion of the assets, business or properties of a Subsidiary that is
not a Material Subsidiary, (y) liquidate, windup or dissolve any Subsidiary that is not a
Material Subsidiary, and (z) sell, or otherwise dispose of, any asset or group of assets
constituting less than (calculated net of liabilities transferred in connection
therewith) (A) in any single transaction or series of related transactions, ten percent
(10%) of Consolidated Statutory Surplus as of the last day of the fiscal quarter ending
on or immediately prior to the date of such sale, and (B) during any fiscal year, in the
aggregate with all such other sales pursuant to this clause (ii)(z), thirty percent (30%)
of Consolidated Statutory Surplus as of the end of the immediately preceding fiscal year.

(i) Section 7.2 of the
Credit Agreement is hereby deleted in its entirety and replaced with the following:

7.2. Indebtedness.

The
Applicant will not, and will not permit or cause any of its Subsidiaries to, directly or
indirectly, create, incur, assume or suffer to exist, any Indebtedness (excluding the
Obligations) other than:

(i)
Indebtedness under any Debt Agreement;

(ii)
Indebtedness of any Wholly Owned Subsidiary of the Applicant to the Applicant or to
another Wholly Owned Subsidiary and of the Applicant to any Wholly Owned Subsidiary;

(iii)
Indebtedness of up to $4,000,000 relating to guarantees of officer loans under the
Applicant's 1998 Financial Support Program;

(iv)
Indebtedness not greater than $9,200,000 relating to guarantees of obligations of Walnut
Towers Associates in existence on the date hereof or incurred prior to December 31, 2002;

---

-6-

(v)
Indebtedness (other than Indebtedness specified in clauses (i) through (iv) above but
including Obligations then outstanding) in the aggregate principal amount not exceeding
$200,000,000 at any time outstanding, which Indebtedness, other than the Obligations,
shall not have any maturity, or be subject to any redemption or prepayment, other than
through a conversion of a convertible security into shares of common stock, prior to a
date one year after the Stated Maturity Date and provided, that within that time frame
the Borrower shall not make any optional redemptions or prepayments of such Indebtedness
(other than the Obligations), other than through a conversion of convertible security
into shares of common stock.

(j) Section 7.5(a) of the
Credit Agreement is hereby amended by adding the phrase and except through a
conversion of a convertible security into shares of common stockto the end of the
last sentence thereof and by adding a new subsection (iii) as follows:

(iii)
The Applicant may make payments and distributions otherwise prohibited under this Section
7.5in amounts not in excess of $20,000,000 in any fiscal year.

(k) Schedule 1.1 to the
Credit Agreement is hereby deleted in its entirety and replaced with Schedule 1.1
attached hereto.

(l) Schedule 4.4 to the
Credit Agreement is hereby deleted in its entirety and replaced with Schedule 4.4
attached hereto.

(m) Schedule 4.7 to the
Credit Agreement is hereby deleted in its entirety and replaced with Schedule 4.7
attached hereto.

(n) Schedule 4.18 to the
Credit Agreement is hereby deleted in its entirety and replaced with Schedule 4.18
attached hereto.

(o) Schedule 7.2 to the
Credit Agreement is hereby deleted in its entirety.

(p) Schedule 7.3 to the
Credit Agreement is hereby deleted in its entirety and replaced with Schedule 7.3
attached hereto.

§3. Ratification, etc.  The
Applicant and the Co-Applicants hereby ratify and confirm all of their obligations,
covenants, and agreements set forth in the Credit Agreement and the other Credit
Documents. The Applicant and the Co-Applicants hereby confirm and agree that all
representations and warranties of the Applicant and the Co-Applicants contained in the
Credit Agreement are true and correct in all material respects as of the date hereof
(except to the extent any such representation or warranty is expressly stated to have
been made as of a specific date, in which case such representation or warranty shall be
true and correct in all material respects as of such date). All references to the Credit
Agreement in any of the Credit Documents shall refer to the Credit Agreement as it has
been modified by this Amendment.

---

-7-

§4. Governing Law. This
Amendment shall for all purposes be construed in accordance with and governed by the laws
of the Commonwealth of Massachusetts.

§5. Headings.The
captions in this Amendment are for convenience of reference only and shall not define or
limit the provisions hereof.

§6. 
Counterparts.  This Amendment and any amendment hereof may
be executed in several counterparts and by each party on a separate counterpart,
each of which when so executed and delivered shall be an original, and all of
which together shall constitute one instrument. In proving this Amendment it
shall not be necessary to produce or account for more than one such counterpart
signed by the party against whom enforcement is sought.

§7. 
Severability.  The provisions of this Amendment are
severable, and if any one clause or provision hereof shall be held invalid or
unenforceable in whole or in part in any jurisdiction, then such invalidity or
unenforceability shall affect only such clause or provision, or part thereof, in
such jurisdiction, and shall not in any manner affect such clause or provision
in any other jurisdiction, or any other clause or provision of this Amendment in
any jurisdiction.

§8. 
Integration.  This Amendment, together with the Credit
Documents, embodies the entire agreement and understanding among the Credit
Parties, the Agent, the Issuing Bank and the Banks with respect to the subject
matter thereof and supersedes all prior agreements and understandings among the
Credit Parties, the Agent, the Issuing Bank and the Banks with respect to the
subject matter thereof.

[The remainder of this page intentionally left blank; the next page is
the signature page]

---

IN WITNESS
WHEREOF, the undersigned have duly executed this Amendment as a sealed
instrument as of the date first set forth above.

| |                                                                 |                            
| | --------------------------------------------------------------- | ---------------------------
| | PMA CAPITAL CORPORATION                                        
|
| | By:                                                             | /s/ William E. Hitselberger
| |                                                                 |                            
| | Name:                                                           | William E. Hitselberger    
| | Title:                                                          | Senior Vice President      
|
|
| | PMA CAPITAL INSURANCE COMPANY                                  
|
| | By:                                                             | /s/ William E. Hitselberger
| |                                                                 |                            
| | Name:                                                           | William E. Hitselberger    
| |                                                                 |                            
| | Title:                                                          | Vice President             
| |                                                                 |                            
|
|
| | PENNSYLVANIA MANUFACTURERS' ASSOCIATION INSURANCE COMPANY      
|
| | By:                                                             | /s/ William E. Hitselberger
| |                                                                 |                            
| | Name:                                                           | William E. Hitselberger    
| |                                                                 |                            
| | Title:                                                          | Senior Vice President      
| |                                                                 |                            
|
|
| | HIGH MOUNTAIN REINSURANCE, LTD.                                
|
| | By:                                                             | /s/ William E. Hitselberger
| |                                                                 |                            
| | Name:                                                           | William E. Hitselberger    
| |                                                                 |                            
| | Title:                                                          | Vice President             
| |                                                                 |                            
|
|
| | FLEET NATIONAL BANK, Individually and as Agent and Issuing Bank
|
| | By:                                                             | /s/ Lawrence Davis         
| |                                                                 |                            
| | Name:                                                           | Lawrence Davis             
| |                                                                 |                            
| | Title:                                                          | Portfolio Manager          
| |                                                                 |                            
|

---