Exhibit 10.5.1



MIDWESTONEFINANCIAL GROUP, INC.

SECOND AMENDMENT TO SECOND AMENDED AND RESTATED CREDIT AGREEMENT



This Second Amendment to Second Amended and Restated Credit Agreement (herein, the Amendment) is entered into as of April 12, 2005,
between MidWestOne Financial Group. Inc., an Iowa corporation (the Borrower), and Harris Trust and Savings Bank (the Bank).



PRELIMINARY STATEMENTS



A. The Borrower and the Bank are parties to that certain Second Amended and Restated Credit Agreement, dated as of November 30, 2003, as amended
(the Credit Agreement). All capitalized terms used herein without definition shall have the same meanings herein as such terms have in the Credit Agreement.



B. The Borrower has requested that the Bank extend the Revolving Credit Termination Date to March 31, 2006, amend the
interest rate applicable to the Loans, and amend Sections 7.8 (Dividends and Certain Other Restricted Payments) and 7.12(b) (Total Non-Performing Assets) of the Credit Agreement, and the Bank is willing to do so under the terms and conditions set
forth in this Amendment.



NOW, THEREFORE, for good and valuable
consideration, the receipt and sufficiency of which is hereby acknowledged, the parties hereto agree as follows:



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. Section 2.1 of the Credit Agreement
(Interest) shall be and hereby is 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.60% 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 on the First such date occurring after the date hereof) and at maturity, and Interest after maturity shall be due and payable on demand.



1.2. The definition of Revolving Credit Termination Date set forth in Section 4 of the Credit Agreement (Definitions) shall be and
hereby is amended and restated in its entirety to read as follows:



Revolving Credit Termination Date means March 31, 2006, or such earlier date on which the Revolving Credit Commitment is terminated in whole pursuant to Section 2.4.8.2 or 8.3 hereof.



1.3. Section 7.8 of the Credit Agreement (Dividends and
Certain Other Restricted Payments) shall be and hereby is amended and restated in its entirely to read as follows:



Section 7.8 Dividends and Certain Other Restricted Payments.The Borrower shall not declare or pay any dividends on or make
any other distributions in respect of any class or series of its capital stock or directly or indirectly purchase, redeem or otherwise acquire or retire any of its capital stock (herein Restricted Payments); provided,
however, that the Borrower may declare and pay Restricted Payments so long as at the time of, and after giving effect to, any such Restricted Payment no Default or Event of Default shall exist.



1.4 Section 7.12(b) of the Credit Agreement (non-Performing
Assets; Total Non-Performing Assets) shall be and hereby is amended and restated in its entirety to read as follows:



(b) Total Non-Performing Assets. The Borrower shall, as of the last day of each fiscal quarter, maintain on a consolidated basis
with its Subsidiaries (excluding, for purposes of this determination only, MIC as a Subsidiary of the Borrower), and shall cause each Banking Subsidiary to maintain as of such day on an individual basis, a ratio of (x) Non-Performing Assets
(determined inclusive of amounts related to loan pool participations) of the Borrower on such consolidated basis or such Banking Subsidiary, as the case may be, to (y) the sum of (i) stockholders equity for the Borrower or core capital for
such Banking Subsidiary, as the case may be, plus loan loss reserves Established by the Borrower on such consolidated basis or such Banking Subsidiary, as the case may be, in accordance with regulatory accounting principles applicable to the
Borrower or such Banking Subsidiary, in an amount less than 0.80 to 1.0.



-2-



---

SECTION 2. CONDITION 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 hererof, after giving effect to the amendments set forth in Section 1 above, 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 representations contained in Section 5.5 shall be deemed to refer to the most recent financial statements of the Borrower
delivered to the Bank) and the Borrower is in compliance with the terms and conditions of the Credit Agreement or no Default or Event of Default exists under the Credit Agreement or shall result after giving effect to the Amendment.



SECTION 4. MISCELLANEOUS.



4.1 The Borrower heretofore executed and delivered to the Bank various 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 provide 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 or document executed in connection therewith, or in any
certificate, letter or 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.



-3-



---

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.



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)



-4-



---

This Second Amendment to Second Amended and Restated Credit Agreement is entered Into as of the date and
year first above written.



|                        |  |                                  |  |                             
|----------------------- |  | -------------------------------- |  | ----------------------------
|                        |  | MIDWESTONE FINANCIAL GROUP, INC.
|                        |  |                                 
|                        |  | By                               |  | /S/    DAVID A. MEINERT     
|                        |  | Name                             |  | David A. Meinert            
|                        |  | Title                            |  | Executive Vice President/CFO
|                        |  |                                 
|Accepted and agreed to. |  |                                  |  |                             
|                        | 
|                        |  | HARRIS TRUST AND SAVINGS BANK   
|                        |  |                                 
|                        |  | By                               |  | /S/    ROBERT G. BOMBEN     
|                        |  | Name                             |  | Robert G. Bomben            
|                        |  | Title                            |  | Vice President              



-5-