<PAGE>

                                                                    EXHIBIT 10.5
                                                                    ------------

                          NOTE MODIFICATION AGREEMENT

                              (Androscoggin Note)


This Note Modification Agreement ("Agreement") is entered into as of this 4th
day of August, 1999, by and between First Coastal Corporation, a Delaware
corporation ("Borrower") and Androscoggin Savings Bank, a Maine savings bank in
stock form ("Lender"), in accordance with a First Amendment to Loan Agreement
entered into as of the date hereof by and among (i) Lender, Machias Savings
Bank, a Maine savings bank in mutual form, and Norway Savings Bank, a Maine
savings bank in mutual form (Lender and the two savings banks are hereinafter
collectively referred to as "Lenders"), and (ii) Machias Savings Bank, in its
capacity as Agent for the Lenders (the "Agent").

     WHEREAS, Borrower borrowed $1,000,000.00 from each of the Lenders and from
Bangor Savings Bank for an aggregate of $4,000,000.00 on July 24, 1996 pursuant
to the terms of a Loan Agreement among Borrower, the Lenders and Bangor Savings
Bank; and

     WHEREAS, Borrower's $4,000,000.00 obligation is evidenced in part by four
promissory notes dated July 24, 1996, each in the original principal amount of
$1,000,000.00 (hereinafter collectively referred to as the "Notes" and
individually as a "Note"); and

     WHEREAS, each of the Lenders have held and continue to hold one of the
Notes, and Bangor Savings Bank has as of the date hereof assigned its Note to
Machias Savings Bank, resulting in Machias Savings Bank holding two of the
Notes; and

     WHEREAS, the parties have agreed to amend certain terms and conditions of
the Loan Agreement dated July 24, 1996 and to amend the Notes; and

     WHEREAS, Lender and Borrower have agreed to modify the terms and conditions
of the $1,000,000 Note held by Lender, a copy of which is attached hereto as
EXHIBIT A;

                             TERMS OF MODIFICATION

1.  FOR MUTUAL CONSIDERATION, the receipt and adequacy of which is acknowledged,
the Borrower and the Lender hereby agree that the Note given by Borrower to
Lender on July 24, 1996, a copy of which is attached hereto as EXHIBIT A, is
hereby amended to provide in its entirety as follows:

                           MODIFIED PROMISSORY NOTE
                           (TERM AND LINE OF CREDIT)


    $1,000,000.00                                      Dated:  August 4, 1999
<PAGE>

          FOR VALUE RECEIVED, the undersigned, First Coastal Corporation, a
     Delaware corporation (the "Borrower"), HEREBY PROMISES TO PAY to
     Androscoggin Savings Bank, a Maine savings bank in mutual form ("Lender"),
     subject to the terms and conditions of the Loan Agreement dated July 24,
     1996, as modified by the First Amendment to Loan Agreement of even date
     herewith, among the Borrower, Machias Savings Bank as Agent (the "Agent"),
     and the Lender and the other savings banks named therein (the "Loan
     Agreement"), the principal amount of ONE MILLION DOLLARS AND NO CENTS
     ($1,000,000.00) or so much thereof as may be advanced in accordance with
     the terms hereof, payable on or before the Term Portion Maturity Date or
     the Credit Line Portion Maturity Date as applicable (as defined below)
     together with interest on the unpaid principal amount of this Note from the
     date hereof at the rates set forth below, to and including the Term Portion
     Maturity Date and the Credit Line Portion Maturity Date as applicable.
     Capitalized terms used herein shall have the same meaning as set forth in
     the Loan Agreement unless otherwise indicated.

          The Term Portion of this Promissory Note is in the principal sum of
     Six Hundred Thousand Dollars and No Cents ($600,000.00) (the "Term
     Portion") and shall be repaid by Borrower in sixty (60) consecutive monthly
     installments of principal and interest, the first thirty-six (36) of which
     shall bear interest at the fixed rate of Eight Percent (8.00%) per annum,
     with the first such payment in the sum of Twelve Thousand One Hundred
     Sixty-Five Dollars and Eighty-four Cents ($12,165.84) to be made on
     September 4, 1999, and with payments of like amount to be made on the 4th
     day of each and every month thereafter, through and including August 4,
     2002 (payments shall be applied first to costs incurred hereunder,
     thereafter to interest accrued, and lastly to the repayment of principal)
     to be followed by payment of the final twenty-four (24) consecutive monthly
     installments of principal and interest (which shall include interest in
     full to date of payment and payment on account of principal to the extent
     each installment will permit after deduction of interest), each such
     payment to be due and payable on the 4th day of each month commencing
     September 4, 2002 and ending on the Term Portion Maturity Date, and each to
     be in an amount to be set from time to time by the holder hereof in order
     to amortize the then remaining principal balance of the Term Portion over
     the final twenty-four (24) months of the term of repayment of the Term
     Portion, with interest on the unpaid principal amount during said twenty-
     four (24) month period computed at a rate equal to the rate of interest
     published from time to time by the Wall Street Journal as the prime rate
     for large commercial banking centers, which rate of interest shall vary as
     said published rate varies effective immediately without notice to the
     Borrower. The Borrower and all parties liable herefor agree to make monthly
     payments in such amounts as the holder hereof may determine to be due and
     owing from time to time during said twenty-four (24) month period. The
     entire principal sum of the Term Portion, unless earlier demanded in
     accordance with the terms hereof, shall be due and payable and shall be
     fully paid on August 4, 2004 (the "Term Portion Maturity Date").

          The Credit Line Portion of this Promissory Note shall be in an amount
    equal to the difference between the outstanding principal balance of the
    Term Portion of this Promissory Note at any time and One Million Dollars and
    No Cents ($1,000,000.00) (the "Credit Line Portion," which as of the date
    hereof is Four Hundred Thousand Dollars ($400,000.00)), and to the extent
    that advances under the Credit Line Portion are made by Lender to or for the
    benefit of Borrower, then Borrower shall repay the same together with
    interest as set forth hereinafter on or before August 4, 2002, when all
    principal and

                                       2
<PAGE>

    interest due and payable under the Credit Line Portion shall be paid in full
    and when no further advances hereunder shall be made for such purpose.
    Interest only shall be due and payable monthly in arrears on the unpaid
    principal balance of the Credit Line Portion from time to time outstanding
    at an interest rate per annum equal to the rate of interest published from
    time to time by the Wall Street Journal as the prime rate for large
    commercial banking centers and which rate of interest shall vary as said
    published rate varies effective immediately without notice to the Borrower,
    with the first such interest payment to be made on September 4, 1999, and
    with payments of all interest accrued on the Credit Line Portion hereof on
    like date of each and every month thereafter through and including August 4,
    2002 (the "Credit Line Maturity Date") when all principal and interest under
    the terms of the Credit Line Portion shall be fully paid.

          Borrower may prepay this Note in whole or in part at any time at its
    option upon not less than three (3) Business Days prior written notice,
    specifying the date and the amount of prepayment, and upon the payment of
    all accrued but unpaid interest on the amount prepaid to the date of such
    prepayment, provided that each such optional principal prepayment shall be
    in a minimum amount of Twenty Five Thousand Dollars and No Cents
    ($25,000.00).

          If the entire amount of any required principal or interest payment is
    not paid in full within five (5) days after the same is due, Borrower shall
    pay to Lender on demand a late fee equal to Five Percent (5%) of the
    required payment.

          The obligation of the Borrower to the Lender hereunder is secured
    pursuant to the terms of the Stock Pledge Agreement dated July 24, 1996,
    made by the Borrower in favor of the Agent (the "Stock Pledge Agreement").
    Upon the occurrence of an Event of Default (as defined in the Loan
    Agreement), the Lender shall have all of the rights set forth in the Loan
    Agreement, as amended, and the Stock Pledge Agreement; provided that
    regardless of the existence of any applicable notice or cure period, upon
    the occurrence of an Event of Default, Lender shall have no further
    obligation to make advances to Borrower under the Credit Line Portion until
    such time, if ever, that Lender shall determine to do so in its sole
    discretion.

          Whenever any payment of principal, interest or fees to be made
    hereunder becomes due on a day other than a Business Day (as defined in the
    Loan Agreement), such payment may be made on the next succeeding Business
    Day, and such extension of time shall in such case be included in the
    computation of the amount of interest then to be paid. All payments and
    prepayments hereunder shall be made by wire transfer to the Lender's account
    (as specified in the Loan Agreement) without offset or counterclaim, in such
    money of the United States as at the time of payment shall be legal tender
    for the payment of public and private debts and in immediately available
    funds. Each payment shall be received by each Lender no later than 2:00
    p.m., Eastern Time (standard or daylight, as in effect) and any payment
    received after such time shall be treated as received on the next Business
    Day.

          Presentment and demand for payment, notice of dishonor, protest and
    notice of protest are hereby waived by the Borrower. The Borrower agrees to
    pay all out-of-pocket expenses (including, but not limited to, reasonable
    attorneys' fees) incurred by the holder hereof in connection with the
    enforcement of this Note.

                                       3
<PAGE>

          This Note and the rights and obligations of the Lender and the
    Borrower hereunder shall be governed by and interpreted and construed in
    accordance with the laws of the State of Maine (but not including the choice
    of law rules thereof).

          Unless an Event of Default shall have occurred, this Note may not be
    transferred or assigned by the Lender without the prior written consent of
    the Borrower.

          BORROWER AND LENDER MUTUALLY HEREBY KNOWINGLY, VOLUNTARILY AND
    INTENTIONALLY WAIVE THE RIGHT TO A TRIAL BY JURY IN RESPECT OF ANY CLAIM
    BASED HEREON, ARISING OUT OF, UNDER OR IN CONNECTION WITH THIS NOTE OR ANY
    OTHER LOAN DOCUMENTS CONTEMPLATED TO BE EXECUTED IN CONNECTION HEREWITH OR
    ANY COURSE OF CONDUCT, COURSE OF DEALINGS, STATEMENTS (WHETHER VERBAL OR
    WRITTEN) OR ACTIONS OF ANY PARTY. THIS WAIVER CONSTITUTES A MATERIAL
    INDUCEMENT FOR LENDER TO ACCEPT THIS NOTE AND MAKE THE LOAN.

2.  The Borrower and the Lender do not intend for this Agreement to affect the
priority of the Stock Pledge Agreement given as security for the Note on July
24, 1996.

IN WITNESS WHEREOF, the parties have signed this Modification Agreement as a
sealed instrument, by their respective undersigned officers, duly authorized, as
of the date first above written.


WITNESS:                                     FIRST COASTAL CORPORATION


/s/ William E.Saufley                        By: /s/ Gregory T. Caswell

                                             Its President and CEO
                                             Hereunto Duly Authorized


                                             ANDROSCOGGIN SAVINGS BANK


/s/ Diane M. Flagg                           By: /s/ Steven A. Closson

                                             Its President
                                             Hereunto Duly Authorized

                                       4