<PAGE>

                                                                   EXHIBIT 10.19

                SECOND AMENDMENT TO MORTGAGE, SECURITY AGREEMENT,
                                 AND ASSIGNMENT

        This Second Amendment to Mortgage, Security Agreement and Assignment is
made as of the 26th day of June, 2002, by and between DYNAMICS RESEARCH
CORPORATION (hereinafter, the "Mortgagor"), a Massachusetts corporation with an
office at 60 Frontage Road, Andover, Massachusetts, and BANKNORTH, N.A.,
formerly known as FIRST MASSACHUSETTS BANK, N.A., formerly known FAMILY BANK,
FSB, a national banking association, for itself and as collateral agent for the
benefit of each of the lenders under a certain Loan and Security Agreement dated
as of February 10, 2000, as amended and restated pursuant to a certain Amended
and Restated Loan Agreement of even date (hereinafter, the "Mortgagee") having
an address for purposes hereof at 7 New England Executive Park, Burlington,
Massachusetts, in consideration of the mutual covenants contained herein and the
benefits to be derived herefrom.

        WHEREAS, the Mortgagor granted to the Mortgagee a certain Mortgage,
Security Agreement and Assignment (hereinafter, as amended, the "Mortgage") in
and to certain premises located on Frontage Road, Andover, Massachusetts (as
more particularly described in the Mortgage, the "Premises") dated February 10,
2000 and recorded with the Essex County Registry of Deeds at Book 5676, Page
217, as amended by a certain Amendment to Mortgage, Security Agreement, and
Assignment dated as of June 12, 2000 and recorded with said Deeds in Book 5776,
Page 76, to secure the Mortgagor's prompt, punctual and faithful payment and
performance of certain of the Mortgagor's present and future Liabilities (as
defined in the Mortgage).

        WHEREAS, the Mortgagor and the Mortgagee wish to amend, modify and
supplement the Mortgage to secure an amendment and increase of the Mortgagor's
existing Liabilities to the Mortgagee to be included as part of the Liabilities
secured by said Mortgage, all as more particularly hereinafter set forth;

        NOW THEREFORE, in consideration of the above premises and of the sum of
One Dollar ($1.00) and other good and valuable consideration, the receipt and
sufficiency of which are hereby acknowledged, the Mortgagor and the Mortgagee
hereby covenant and agree as follows:

        1.      Article 1 of the Mortgage is hereby deleted in its entirety and
                replaced with the following:

                "ARTICLE 1 - GRANT OF MORTGAGE INTEREST

                     To secure the Mortgagor's prompt, punctual, and faithful
                payment and performance of all and each of the Mortgagor's
                present and future Liabilities (as defined herein) to the
                Mortgagee and each of the Lenders arising under a certain
                Amended and Restated Loan Agreement of even date between, among
                others, the Mortgagor, the Mortgagee, as Documentation Agent,
                Brown Brothers Harriman & Co., as Administrative Agent, and Key
                Corporate Capital Inc., as Syndication Agent (as amended,
                modified or replaced, the "Credit Agreement"), (Banknorth,

<PAGE>

                N.A., Brown Brothers Harriman & Co., Key Corporate Capital Inc.
                and such other lenders as may become parties to the Credit
                Agreement shall hereinabove and hereinafter be collectively
                referred to as the "Lenders") including, without limitation, (i)
                a certain Revolving Credit Note dated June 28, 2002 made by,
                among others, the Mortgagor payable to Banknorth, N.A. in the
                original principal amount of $15,500,000.00, (ii) a certain
                Revolving Credit Note dated June 28, 2002 made by, among others,
                the Mortgagor payable to Brown Brothers Harriman & Co. in the
                original principal amount of $15,500,000.00, (iii) a certain
                Revolving Credit Note dated June 28, 2002 made by, among others,
                the Mortgagor payable to Key Corporate Capital Inc. in the
                original principal amount of $19,000,000.00 (iv) a certain
                Amended and Restated Term Note dated as of June 12, 2000 made
                by, among others, the Mortgagor payable to First Massachusetts
                Bank, N.A., formerly known as Family Bank, FSB in the original
                principal amount of $5,000,000.00, as amended and restated by a
                certain Amended and Restated Term Note dated as of June 28, 2002
                made by, among others, the Mortgagor payable to Banknorth, N.A.,
                formerly known as First Massachusetts Bank, N.A., formerly known
                as Family Bank, FSB in the original principal amount of
                $5,000,000, and (v) a certain Amended and Restated Term Note
                dated as of June 12, 2000 made by, among others, the Mortgagor
                payable to Brown Brothers Harriman & Co. in the original
                principal amount of $5,000,000.00, as amended and restated by a
                certain Amended and Restated Term Note dated as of June 28, 2002
                made by, among others, the Mortgagor payable to Brown Brothers
                Harriman & Co. in the original principal amount of $5,000,000,
                and any extensions, renewals, substitutions, modifications or
                replacements of any of the foregoing (hereinafter, singly and
                collectively, the "Notes")," the Mortgagor hereby grants,
                mortgages, assigns, and transfers to the Mortgagee with MORTGAGE
                COVENANTS, the Collateral (as defined herein). The Mortgagor
                intends to convey and hereby does convey to the Mortgagee with
                MORTGAGE COVENANTS(to be included within the Collateral), the
                premises conveyed to the Mortgagor by deed recorded with the
                Essex County Registry of Deeds to secure the Liabilities.

        2.      Except as specifically modified herein, all terms and conditions
                of the Mortgage shall remain in full force and effect and are
                hereby ratified and confirmed. The Mortgage, as modified hereby,
                and as provided in said Mortgage, is upon the STATUTORY
                CONDITION and upon the further condition that all covenants and
                agreements of the Mortgagor contained therein and herein shall
                be kept and fully performed, for any breach of which condition
                the holder hereof shall have the STATUTORY POWER OF SALE.

        3.      The Mortgagor acknowledges, confirms and agrees that as of the
                date hereof it has no offsets, defenses, claims or counterclaims
                against the Mortgagee with respect to any of its liabilities or
                obligations due and owing to the Mortgagee, and, to the extent
                that the Mortgagor has or has ever had any such offsets,
                defenses, claims or counterclaims, the Mortgagor hereby
                specifically WAIVES and RELEASES any and all rights to such
                offsets, defenses, claims or counterclaims.

                                       -2-

<PAGE>

        IN WITNESS WHEREOF, the parties hereto have caused these presents to be
signed, sealed and acknowledged and duly authorized as of the 27th day of June,
2002.

                        DYNAMICS RESEARCH CORPORATION

                        ("Mortgagor")

                        By:             /s/ James P. Regan
                            ------------------------------------------
                            James P. Regan, President

                        By:            /s/ David C. Proctor
                            ------------------------------------------
                            David C. Proctor, Treasurer

                        ("Mortgagee")

                        BANKNORTH, N.A., formerly known as FIRST MASSACHUSETTS
                        BANK, N.A., formerly known as FAMILY BANK, FSB, for
                        itself and as collateral agent

                        By:            /s/ C. Lee Willingham
                            ------------------------------------------
                            C. Lee Willingham, Vice President

                          COMMONWEALTH OF MASSACHUSETTS

Essex County, ss.                                                  June 27, 2002

        Then personally appeared the above named James P. Regan and David C.
Proctor, being the President and Treasurer of Dynamics Research Corporation, and
acknowledged the foregoing instrument to be their free act and deed and the free
act and deed of said corporation, before me,

                                                /s/ Richard A. Covel
                                     -------------------------------------------
                                     Notary Public
                                     My Commission Expires: March 24, 2004

                          COMMONWEALTH OF MASSACHUSETTS

Middlesex, ss.                                                     June 26, 2002

        Then personally appeared the above named C. Lee Willingham, the Vice
President of Banknorth, N.A., formerly known as First Massachusetts Bank, N.A.,
formerly known as Family Bank, FSB, and acknowledged the foregoing instrument to
be said person's free act and deed and the free act and deed of said entity,
before me,

                                              /s/ Michelle M. Higgins
                                     -------------------------------------------
                                     Notary Public
                                     My Commission Expires: 2/14/08

                                       -3-