

                       SECOND LOAN MODIFICATION AGREEMENT



         This Second Loan Modification Agreement ("this Agreement") is made as
of May 15, 1996 between Pegasystems Inc., a Massachusetts corporation (the
"Borrower") and Fleet National Bank (successor by merger to Fleet Bank of
Massachusetts, N.A.) (the "Bank"). For good and valuable consideration, receipt
and sufficiency of which are hereby acknowledged, the Borrower and the Bank act
and agree as follows:

         1. Reference is made to (i) that certain letter agreement dated
December 16, 1993 between the Borrower and Fleet Bank of Massachusetts, N.A., as
amended by Loan Modification Agreement dated as of May 5, 1995 (as so amended,
the "Letter Agreement"), the Bank having succeeded to the rights of Fleet Bank
of Massachusetts, N.A. thereunder; (ii) that certain $2,500,000 face principal
amount promissory note dated May 5, 1995 (the "1995 Revolving Note") made by the
Borrower and payable to the order of Fleet Bank of Massachusetts, N.A.; (iii)
that certain Security Agreement dated as of December 16, 1993 given by the
Borrower to Fleet Bank of Massachusetts, N.A., as amended by said May 5, 1995
Loan Modification Agreement (as so amended, the "Security Agreement"), the Bank
having succeeded to the rights of Fleet Bank of Massachusetts, N.A. thereunder;
(iv) certain term notes of the Borrower (the "Term Notes") heretofore issued by
the Borrower to Fleet Bank of Massachusetts, N.A., the Bank having succeeded to
the rights of Fleet Bank of Massachusetts, N.A. thereunder; and (v) that certain
$5,000,000 face principal amount promissory note of even date herewith (the
"1996 Revolving Note") made by the Borrower and payable to the order of the
Bank. The Letter Agreement, the Security Agreement, the Term Notes and the 1996
Revolving Note are hereinafter collectively referred to as the "Financing
Documents". The aforesaid May 5, 1995 Loan Modification Agreement is hereinafter
referred to as the "1995 Modification".

         2.       The Letter Agreement is hereby amended, effective as of the 
date hereof:

         a.       By providing that all references therein to the "Bank" will 
be deemed to refer to Fleet National Bank.

         b.       By deleting in its entirety clause (i) of Section 1.1 of the 
Letter Agreement and by substituting in its stead the following:

                  "(i) that certain $5,000,000 face principal amount promissory
                  note (the `Revolving Note') dated May 15, 1996 made by the
                  Borrower and payable to the order of the Bank,"

As a result, all references in the Letter Agreement to a "Revolving Note" or to
the "1995 Revolving Note" will be deemed to refer to the 1996 Revolving Note.

         c. By deleting from the third sentence of the third paragraph of
Section 1.8 of the Letter Agreement (as renumbered by the 1995 Modification) the
words "at its Principal Office, in immediately available funds" and by
substituting in their stead the following:

                  ", in immediately available funds, at its Principal Office or
                  to such other address as the Bank may from time to time
                  direct"

         d. By deleting from the first sentence of Section 1.9 of the Letter
Agreement (as renumbered by the 1995 Modification) the amount "$2,500,000" and
by substituting in its stead the following:

                  "$5,000,000"
<PAGE>

         e.       By deleting the period at the end of the fourth sentence of 
Section 6.3 of the Letter Agreement (as replaced by the 1995 Modification) and 
by substituting in its stead the following:

                  "; provided that commencing with the quarterly facility fee
                  payment due July 1, 1996 the quarterly facility fee shall be
                  $3,125 per quarter and the Borrower shall also pay on May 15,
                  1996 the sum of $407.99, representing the increased facility
                  fee for the period May 15, 1996 - June 30, 1996."

         f.       By deleting from Section 6.6 of the Letter Agreement the 
words "Fleet Bank of Massachusetts, N.A." and by substituting in their stead 
the following:

                  "Fleet National Bank"

         g. By deleting from the definition of "Expiration Date" appearing in
Section 7.1 of the Letter Agreement the date "June 1, 1996" (such date having
been inserted by the 1995 Modification) and by substituting in its stead the
following:

                  "June 30, 1997"

As a result, from and after the date hereof, for the purposes of the Letter
Agreement and the other Financing Documents, the "Expiration Date" will be
deemed to be June 30, 1997.

         h. By deleting from the definition of "Maximum Revolving Amount"
appearing in Section 7.1 of the Letter Agreement the amount "$2,500,000" and by
substituting in its stead the following:

                  "$5,000,000"

         i. By inserting into the definition of "Principal Office" appearing in
Section 7.1 of the Letter Agreement, immediately after the words "of the Bank",
the following:

                  "in Boston, MA"

         3. Each of the Term Notes is hereby modified by providing that all
references therein to the "Bank" will be deemed to refer to Fleet National Bank.

         4. The Security Agreement is hereby modified by providing that all
references therein to the "Bank" will be deemed to refer to Fleet National Bank.

         5. Wherever in any Financing Document, or in any certificate or opinion
to be delivered in connection therewith, reference is made to a "letter
agreement" or to the "Letter Agreement", from and after the date hereof same
will be deemed to refer to the Letter Agreement, as hereby amended.

         6. Simultaneously with the execution and delivery of this Agreement,
the Borrower is executing and delivering to the Bank the 1996 Revolving Note, in
substitution for the 1995 Revolving Note. The 1996 Revolving Note is a
$5,000,000 promissory note of the Borrower, substantially in the form attached
hereto as Exhibit 1. Wherever in any of the Financing Documents or in any
certificate or opinion to be delivered in connection therewith, reference is
made to a "Revolving Note", from and after the date hereof same will be deemed
to refer to the 1996 Revolving Note. The Bank agrees that, within 10 business
days after it has received the executed originals of the 1996 Revolving Note and
this Agreement (together with the related Clerk's Certificate and opinion of
counsel) and has received payment of all interest accrued under the 1995
Revolving Note to May 15, 1996, the Bank will mark the 1995 Revolving Note
"paid" and will return it to the Borrower.
<PAGE>

         7.       In order to induce the Bank to enter into this Agreement, the 
Borrower further represents and warrants as follows:

         a. The execution, delivery and performance of this Agreement and the
1996 Revolving Note have been duly authorized by the Borrower by all necessary
corporate and other action, will not require the consent of any third party and
will not conflict with, violate the provisions of, or cause a default or
constitute an event which, with the passage of time or the giving of notice or
both, could cause a default on the part of the Borrower under its charter
documents or by-laws or under any contract, agreement, law, rule, order,
ordinance, franchise, instrument or other document, or result in the imposition
of any lien or encumbrance (except in favor of the Bank) on any property or
assets of the Borrower.

         b.       The Borrower has duly executed and delivered each of this 
Agreement and the 1996 Revolving Note.

         c. Each of this Agreement and the 1996 Revolving Note is the legal,
valid and binding obligation of the Borrower, enforceable against the Borrower
in accordance with its respective terms.

         d. The statements, representations and warranties made in the Letter
Agreement continue to be correct as of the date hereof; except as amended,
updated and/or supplemented by the attached Supplemental Disclosure Schedule.

         e.       The covenants and agreements of the Borrower contained in the 
Letter Agreement have been complied with on and as of the date hereof.

         f. No event which constitutes or which, with notice or lapse of time,
or both, could constitute, an Event of Default (as defined in the Letter
Agreement) has occurred and is continuing.

         g. No material adverse change has occurred in the financial condition
of the Borrower from that disclosed in the annual financial statements of the
Borrower dated December 31, 1994, heretofore furnished to the Bank.

         8.       Except as expressly affected hereby, the Letter Agreement and 
each of the other Financing Documents remains in full force and effect as 
heretofore.

         9. Nothing contained herein will be deemed to constitute a waiver or a
release of any provision of any of the Financing Documents. Nothing contained
herein will in any event be deemed to constitute an agreement to give a waiver
or release or to agree to any amendment or modification of any provision of any
of the Financing Documents on any other or future occasion.

         Executed, as an instrument under seal, as of the day and year first
above written.

                                               PEGASYSTEMS INC.


                                               By:____________________________
                                                  Name:
                                                  Title:

Accepted and agreed:
FLEET NATIONAL BANK


By:_____________________________
   Name:
   Title:


<PAGE>



                        SUPPLEMENTAL DISCLOSURE SCHEDULE





         1.       Messrs. Trefler and Vishner have transferred certain shares 
of their stock in the Borrower to family members and/or trusts for the benefit 
of same.

         2.       The Borrower's English office is located at Apex Plaza, 
Reading, Berkshire RG1 1AX, England.  The landlord is The Prudential Assurance 
Company Limited.


