<PAGE>

                                                                  Exhibit 10.5.1

                           MAHASKA INVESTMENT COMPANY
            FIRST AMENDMENT TO AMENDED AND RESTATED CREDIT AGREEMENT

Harris Trust and Savings Bank
Chicago, Illinois

Ladies and Gentlemen:

     Reference is hereby made to that certain Amended and Restated Credit
Agreement dated as of June 30, 2000 (the "Credit Agreement"), between the
undersigned, Mahaska Investment Company, an Iowa corporation (the "Borrower"),
and Harris Trust and Savings Bank (the "Bank"). All capitalized terms used
herein without definition shall have the same meanings herein as such terms have
in the Credit Agreement.

     The Borrower has requested that the Bank extend the Termination Date, offer
alternate pricing options and make certain other amendments to the Credit
Agreement, and the Bank is willing to do so under the terms and conditions set
forth in this agreement (herein, the "Amendment").

SECTION 1.   AMENDMENTS.

     Subject to the satisfaction of the conditions precedent set forth in
Section 2 below, the Credit Agreement shall be and hereby is amended as follows:

     1.1. Effective as of August 24, 2001, Section 2.1 of the Credit Agreement
is hereby amended and restated in its entirety to read as follows:

          Section 2.1. Interest. The outstanding principal balance of the Loans
shall bear interest (which the Borrower hereby promises to pay at the rates and
at the times set forth herein) prior to maturity (whether by lapse of time,
acceleration or otherwise) at the rate per annum determined by subtracting (but
not below zero) 0.80% per annum from the Prime Rate as in effect from time to
time and after maturity (whether by lapse of time, acceleration or otherwise),
whether before or after judgment, until payment in full thereof at the rate per
annum determined by adding 3% to the Prime Rate as in effect from time to time.
Any change in the interest rate on the Loans resulting from a change in the
Prime Rate shall be effective on the date of the relevant change in the Prime
Rate. Interest on the Loans shall be computed on the basis of a year of 360 days
for the actual number of days elapsed. Interest on the Loans shall be payable
quarterly in arrears on the last day of each calendar quarter in each year
(commencing June 30, 2000) and at maturity, and interest after maturity shall be
due and payable on demand.

     1.2. The definition of "Revolving Credit Termination Date" appearing in
Section 4 of the Credit Agreement is hereby amended by striking the date "June
30, 2001" and inserting the date "June 30, 2002" in lieu thereof.


                                       1

<PAGE>

SECTION 2.  CONDITIONS PRECEDENT.

     The effectiveness of this amendment is subject to the satisfaction of all
of the following conditions precedent:

     2.1. The Borrower and the Bank shall have executed and delivered this
Amendment.

     2.2. Legal matters incident to the execution and delivery of this Amendment
shall be satisfactory to the Bank and its counsel.

SECTION 3.  REPRESENTATIONS.

     In order to induce the Bank to execute and deliver this Amendment, the
Borrower hereby represents to the Bank that as of the date hereof the
representations and warranties set forth in Section 5 of the Credit Agreement
are and shall be and remain true and correct (except that the terms and
conditions of the Credit Agreement and no Default or Event of Default has
occurred and is continuing under the Credit Agreement or shall result after
giving effect to this Amendment.

SECTION 4.   MISCELLANEOUS.

     4.1. The Borrower heretofore executed and delivered to the Bank certain
Collateral Documents. The Borrower hereby acknowledges and agrees that the Liens
created and provided for by the Collateral Documents continue to secure, among
other things, the Obligations arising under the Credit Agreement as amended
hereby; and the Collateral Documents and the rights and remedies of the Bank
thereunder, the obligations of the Borrower thereunder, and the Liens created
and provided for thereunder remain in full force and effect and shall not be
affected, impaired or discharged hereby. Nothing herein contained shall in any
manner affect or impair the priority of the liens and security interests created
and provided for by the Collateral Documents as to the indebtedness which would
be secured thereby prior to giving effect to this Amendment.

     4.2. Except as specifically amended herein, the Credit Agreement shall
continue in full force and effect in accordance with its original terms.
Reference to this specific Amendment need not be made in the Credit Agreement,
the Notes, or any other instrument of document executed in connection therewith,
or in any certificate, letter of communication issued or made pursuant to or
with respect to the Credit Agreement, any reference in any of such items to the
Credit Agreement being sufficient to refer to the Credit Agreement as amended
hereby.

     4.3. The Borrower agrees to pay on demand all costs and expenses of or
incurred by the Bank in connection with the negotiation, preparation, execution
and delivery of this Amendment, including the fees and expenses of counsel for
the Bank.


                                       2

<PAGE>

     4.4. This Amendment may be executed in any number of counterparts, and by
the different parties on different counterpart signature pages, all of which
taken together shall constitute one and the same agreement. Any of the parties
hereto may execute this Amendment by signing any such counterpart and each of
such counterparts shall for all purposes be deemed to be an original. This
Amendment shall be governed by the internal laws of the State of Illinois.

                           [SIGNATURE PAGE TO FOLLOW]


                                       3

<PAGE>

     This First Amendment to Amended and Restated Credit Agreement is entered
into as of this 30th day of June, 2001.

                                     MAHASKA INVESTMENT COMPANY

                                     By /s/ Charles S. Howard
                                        ---------------------
                                      Name   Charles S. Howard
                                            ------------------
                                      Title  President & CEO
                                            ----------------


Accepted and agreed to.


                                     HARRIS TRUST AND SAVINGS BANK

                                     By /s/ Robert G. Bomben


                                      Name   Robert G. Bomben
                                            -----------------
                                      Title  Vice President
                                            ------------------


                                       4