EXHIBIT 10.4

# MAF BANCORP, INC.

# SPECIAL TERMINATION
AGREEMENT

This
AGREEMENT is made effective as of October 1, 2006 by and between MAF Bancorp, Inc. (the
Holding Company), a corporation organized under the laws of the State of
Delaware, with its office at 55th & Holmes Avenue, Clarendon Hills, Illinois, and
James S. Eckel (the Executive). The term Bank refers to Mid
America Bank, fsb, the wholly-owned subsidiary of the Company.

WHEREAS,
the Holding Company recognizes the substantial experience and abilities of the Executive
and the Holding Company wishes to protect his position therewith for the period provided
in this Agreement; and

WHEREAS,
Executive has been elected to, and has agreed to serve in the position of Senior Vice
President-Marketing for the Holding Company, a position of substantial responsibility
which will require Executive to manage the marketing function of the Holding Company.

NOW,
THEREFORE, in consideration of the contribution and responsibilities of Executive, and
upon the other terms and conditions hereinafter provided, the parties hereto agree as
follows:

1.    
          TERM OF AGREEMENT.

The
term of this Agreement shall be deemed to have commenced as of the date first written
above and shall continue through December 31, 2008. At or near each anniversary date of
the effective date as set forth above, the board of directors of the Holding Company
(Board) may extend the Agreement an additional year. The Board will review the
Agreement and the Executives performance annually for purposes of determining
whether to extend the Agreement, and the results thereof shall be included in the minutes
of the Boards meeting. In the event the Executive chooses not to renew the
Agreement, the Executive shall provide the Holding Company with written notice at least
ten (10) days and not more than twenty (20) days prior to such anniversary date. If either
the Holding Company or the Executive chooses not to renew the Agreement for an additional
period, the Agreement shall cease at the end of its remaining term unless the
Executives employment is voluntarily or involuntarily terminated with the Holding
Company pursuant to Section 2 hereof.

2.    
          PAYMENTS TO EXECUTIVE UPON CHANGE IN CONTROL.

(a)       
          Upon the occurrence of a Change in Control of the Holding Company (as herein
          defined) followed at any time during the term of this Agreement by the voluntary
          or involuntary termination of Executives employment, other than for Cause,
          as defined in Section 2(c) hereof, the provisions of Section 3 shall apply. Upon
          the occurrence of a Change in Control, Executive shall have the right to elect
          to voluntarily terminate his employment at any time during the term of this
          Agreement following any demotion, loss of title, office or significant
          authority, reduction in his annual compensation, or relocation of his principal
          place of employment by more than 50 miles from its location immediately prior to
          the Change in Control.

---

|(b) | Definition of a Change in Control. A Change in Control of the Bank
                    or the Holding Company shall mean a change in control of a nature that:
|--- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------

|(i) | would be required to be reported in response to Item 1.01 of the current report
                    on Form 8-K, as in effect on the date hereof, pursuant to Section 13 or 15(d) of
                    the Securities Exchange Act of 1934 (the Exchange Act); or
|--- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

|(ii) | results in a Change in Control of the Bank or the Holding Company within the
                    meaning of the Home Owners Loan Act of 1933 and the Rules and Regulations
                    promulgated by the Office of Thrift Supervision (or its predecessor agency), as
                    in effect on the date hereof including Section 574 of such regulations; or
|---- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

|(iii) | without limitation, such a Change in Control shall be deemed to have occurred
                    at such time as (a) any person (as the term is used in Sections
                    13(d) and 14(d) of the Exchange Act) is or becomes the beneficial
                    owner (as defined in Rule 13d-3 under the Exchange Act), directly or
                    indirectly, of securities or makes an offer to purchase securities of the Bank
                    or Holding Company representing 20% or more of the Banks or Holding
                    Companys outstanding securities, except for any securities of the Bank
                    owned by the Holding Company and any securities purchased by the Banks
                    employee stock ownership plan and trust; or (b) individuals who constitute the
                    Board of Directors of the Holding Company on the date hereof (the
                    Incumbent Board) cease for any reason to constitute at least a
                    majority thereof, provided that any person becoming a director subsequent to the
                    date hereof whose election was approved by a vote of at least three-quarters of
                    the directors comprising the Incumbent Board, or whose nomination for election
                    by the Holding Companys shareholders was approved by the Holding
                    Companys Nominating Committee, shall be, for purposes of this clause (b),
                    considered as though he were a member of the Incumbent Board; or (c) merger,
                    consolidation or sale of all or substantially all the assets of the Bank or
                    Holding Company occurs; or (d) a proxy statement shall be distributed soliciting
                    proxies from stockholders of the Holding Company, by someone other than the
                    current management of the Holding Company, seeking stockholder approval of the
                    reorganization, merger or consolidation of the Holding Company or Bank with one
                    or more corporations as a result of which the outstanding shares of the class of
                    securities then subject to the Plan are exchanged for or converted into cash or
                    property or securities not issued by the Bank or Holding Company; or (e) a
                    tender offer is made for 20% or more of the outstanding securities of the Bank
                    or Holding Company.
|----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

However,
notwithstanding anything contained in this section to the contrary, a Change in Control
shall not be deemed to have occurred as a result of an event described in (i), (ii) or
(iii) (a), (c) or (e) above which resulted from an acquisition or proposed acquisition of
stock of the Holding Company by a person, as defined in the OTS Acquisition of
Control Regulations (12 C.F.R. Section 574) (the Control Regulations), who was
an executive officer of the Holding Company on January 19, 1990 and who has continued to
serve as an executive officer of the Holding Company as of the date of the event described
in (i), (ii) or (iii) (a), (c) or (e) above (an incumbent officer). In the
event a group of individuals acting in concert satisfies the definition of
person under the Control Regulations, the requirements of the preceding
sentence shall be satisfied, and thus a change in control shall not be deemed to have
occurred, if at least one individual in the group is an incumbent officer.

(c)       
          Executive shall not have the right to receive termination benefits pursuant to
          Section 3 hereof upon Termination for Cause. The term Termination for
          Cause shall mean termination upon intentional failure to perform stated
          duties, personal dishonesty which results in loss to the Holding Company or one
          of its affiliates or willful violation of any law, rule, regulation or final
          cease and desist order which results in substantial loss to the Holding Company
          or one of its affiliates or any material breach of this Agreement. For purposes
          of this Section, no act, or the failure to act, on Executives part shall
          be willful unless done, or omitted to be done, not in good faith and
          without reasonable belief that the action or omission was in the best interest
          of the Holding Company or its affiliates. Notwithstanding the foregoing,
          Executive shall not be deemed to have been terminated for Cause unless and until
          there shall have been delivered to him a copy of a resolution duly adopted by
          the affirmative vote of not less than three-fourths of the members of the Board
          at a meeting of the Board called and held for that purpose (after reasonable
          notice to Executive and an opportunity for him, together with counsel, to be
          heard before the Board), finding that in the good faith opinion of the Board,
          Executive was guilty of conduct justifying termination for Cause and specifying
          the particulars thereof in detail. The Executive shall not have the right to
          receive compensation or other benefits for any period after termination for
          Cause. Any stock options granted to Executive under any stock option plan of the
          Bank, the Holding Company or any subsidiary or affiliate thereof, shall become
          null and void effective upon Executives receipt of Notice of Termination
          for Cause, and shall not be exercisable by Executive at any time subsequent to
          such Termination for Cause.

3.    
          TERMINATION BENEFITS.

(a)       
          Upon the occurrence of a Change in Control, followed at any time during the term
          of this Agreement by the voluntary or involuntary termination of
          Executives employment, other than for Termination for Cause, the Bank and
          the Holding Company shall pay Executive, or in the event of his subsequent
          death, his beneficiary or beneficiaries, or his estate, as the case may be, as
          severance pay or liquidated damages, or both, a sum equal to the average annual
          compensation paid to Executive for the three (3) years immediately preceding
          Executives termination. For purposes of the preceding sentence
          compensation shall include only base salary plus annual cash bonus payments. At
          the discretion of Executive, upon an election pursuant to Section 3(e) hereof,
          such payment may be made in a lump sum immediately upon severance of
          Executives employment or paid, on a pro rata basis, semi-monthly during
          the thirty-six (36) months following Executives termination.

(b)       
          Upon the occurrence of a Change in Control of the Bank or the Holding Company
          followed at any time during the term of this Agreement by Executives
          voluntary or involuntary termination of employment, other than for Termination
          for Cause, the Holding Company shall cause to be continued life, health and
          disability coverage substantially identical to the coverage maintained by the
          Bank for Executive and his or her dependents prior to his severance. Such
          coverage shall cease upon the earlier of Executives obtaining similar
          coverage by another employer or twelve (12) months from the date of
          Executives termination. In the event the Executive obtains new employment
          and receives less coverage for life, health or disability, the Holding Company
          shall provide coverage substantially identical to the coverage maintained by the
          Bank for the Executive and his or her dependents prior to termination for a
          period of twelve (12) months from the date of Executives termination.

(c)       
          Upon the occurrence of a Change in Control, the Executive will have such rights
          as specified in the Holding Companys stock option plans or any other
          employee benefit plan with respect to options and such other rights as may have
          been granted to Executive under such plans.

(d)    
          [INTENTIONALLY LEFT BLANK]

(e)       
          On an annual basis Executive shall elect whether, in the event amounts are
          payable under Sections 3(a) hereof, such amounts shall be paid in a lump
          sum or on a pro rata basis pursuant to such sections. Such election shall be
          irrevocable for the year for which such election is made.

(f)       
          Notwithstanding the preceding paragraphs of this Section 3, in the event it
          shall be determined that any payment or distribution of any type to or for the
          benefit of the Executive by the Holding Company, any of its affiliates, or any
          person who acquires ownership or effective control of the Holding Company or
          ownership of a substantial portion of the Holding Companys assets (within
          the meaning of Section 280G of the Code, and the regulations thereunder) or any
          affiliate of such person, whether paid or payable or distributed or
          distributable pursuant to the terms of this Agreement or otherwise (the
          Total Payments), is subject to the excise tax imposed by Section
          4999 of the Code or any similar successor provision or any interest or penalties
          with respect to such excise tax (such excise tax, together with any such
          interest and penalties, are collectively referred to as the Excise
          Tax), then, except in the case of a Deminimus Excess Amount (as described
          below), the Executive shall be entitled to receive an additional payment (a
          Gross-Up Payment) in an amount such that after payment by the
          Executive of all taxes imposed upon the Gross-Up Payment (including any federal,
          state and local income, payroll or excise taxes and any interest or penalties
          imposed with respect to such taxes), the Executive retains an amount of the
          Gross-Up Payment equal to the Excise Tax imposed upon the Total Payments (not
          including any Gross-Up Payment).

In
the event that the amount by which the present value of the Total Payments which
constitute parachute payments (within the meaning of Section 280G of the
Code)(the Parachute Payments) exceeds three (3) times the Executives
base amount (within the meaning of Section 280G of the Code)(the Base
Amount) is less than 3% of the amount determined under Section 3(a) of this
Agreement, such excess shall be deemed to be a Deminimus Excess Amount and the Executive
shall not be entitled to a Gross-Up Payment. In such an instance, the Parachute Payments
shall be reduced to an amount (the Non-Triggering Amount), the value of which
is one dollar ($1.00) less than an amount equal to three (3) times Executives Base
Amount; provided that such reduction shall not be made unless the Non-Triggering Amount
would be greater than the aggregate value of the Parachute Payments (without such
reduction) minus the amount of Excise Tax required to be paid by Executive thereon. The
reduction required hereby shall be made by reducing the amount payable under Section 3(a)
of this Agreement.

All
determinations as to the portion, if any, of the Total Payments which constitute Parachute
Payments, whether a Gross-Up Payment is required, the amount of such Gross-Up Payment, the
amount of any reduction, and any amounts relevant to the foregoing paragraphs of this
Section 3(f) shall be made by an independent accounting firm selected by the Holding
Company, which may be the accounting firm then regularly retained by the Holding Company
(the Accounting Firm). The Accounting Firm shall provide its determination
(the Determination), together with detailed supporting calculations, regarding
the amount of any Gross-Up Payment and any other relevant matter, both to the Holding
Company and the Executive, within five (5) days of a date of termination, if applicable,
or such earlier time as is requested by the Holding Company or the Executive (if the
Executive reasonably believes that any of the Total Payments may be subject to the Excise
Tax). Any determination by the Accounting Firm shall be binding upon the Holding Company
and the Executive. As a result of uncertainty in the application of Sections 280G and 4999
of the Code at the time of the initial determination by the Accounting Firm hereunder, or
as a result of a subsequent determination by the Internal Revenue Service or a judicial
authority, it is possible that the Holding Company should have made Gross-Up Payments
(Underpayment), or that Gross-Up Payments will have been made by the Holding
Company which should not have been made (Overpayments). In either such event,
the Accounting Firm shall determine the amount of the Underpayment or Overpayment that has
occurred. In the case of the Underpayment, the amount of such Underpayment shall be
promptly paid by the Holding Company to or for the benefit of the Executive. In the case
of an Overpayment, the Executive shall, at the direction and expense of the Holding
Company, take such steps as are reasonably necessary (including the filing of returns and
claims for refund), follow reasonable instructions from, and procedures established by,
the Holding Company, and otherwise reasonably cooperate with the Holding Company to
correct such Overpayment, including repayment of such Overpayment to the Holding Company.

4.    
          NOTICE OF TERMINATION.

Any
purported termination by the Holding Company or by Executive shall be communicated by
Notice of Termination to the other party hereto.

For
purposes of this Agreement, a Notice of Termination shall mean a written
notice which shall indicate the specific termination provision in this Agreement relied
upon and shall set forth in detail the facts and circumstances claimed to provide a basis
for termination of Executives employment under the provision so indicated.
Date of Termination shall mean the date specified in the Notice of Termination
(which, in the case of a Termination for Cause, shall not be less than thirty (30) days
from the date such Notice of Termination is given); provided that if, within thirty (30)
days after any Notice of Termination is given, the party receiving such Notice of
Termination notifies the other party that a dispute exists concerning the termination, the
date of Termination shall be the date on which the dispute is finally determined, either
by mutual written agreement of the parties, by a binding arbitration award, or by a final
judgment, order or decree of a court of competent jurisdiction (the time for appeal there
from having expired and no appeal having been perfected) and provided further that the
Date of Termination shall be extended by a notice of dispute only if such notice is given
in good faith and the party giving such notice pursues the resolution of such dispute with
reasonable diligence.

5.    
          SOURCE OF PAYMENTS.

It
is intended by the parties hereto that all payments provided in this Agreement shall be
paid in cash or check from the general funds of the Holding Company. The Holding Company
guarantees payment and provision of all amounts and benefits due to the Executive under
the Special Termination Agreement by and between the Bank and the Executive, if any
amounts and benefits due from the Bank are not timely paid or provided by the Bank, such
amounts and benefits shall be paid or provided by the Holding Company.

6.    
          EFFECT ON PRIOR AGREEMENTS AND EXISTING BENEFIT PLANS.

This
Agreement contains the entire understanding between the parties hereto and supersedes any
prior agreement between the Holding Company and Executive, except that this Agreement
shall not affect or operate to reduce any benefit or compensation inuring to Executive of
a kind elsewhere provided. No provision of this Agreement shall be interpreted to mean
that Executive is subject to receiving fewer benefits than those available to him without
reference to this Agreement.

7.    
          NO ATTACHMENT.

(a)       
          Except as required by law, no right to receive payments under this Agreement
          shall be subject to anticipation, commutation, alienation, sale, assignment,
          encumbrance, charge, pledge, or hypothecation, or to execution, attachment,
          levy, or similar process or assignment by operation of law, and any attempt,
          voluntary or involuntary, to affect any such action shall be null, void, and of
          no effect.

(b)       
          This Agreement shall be binding upon, and inure to the benefit of, Executive,
          the Holding Company and their respective successors and assigns.

8.    
          MODIFICATION AND WAIVER.

(a)       
          This Agreement may not be modified or amended except by an instrument in writing
          signed by the parties hereto.

(b)       
          No term or condition of this Agreement shall be deemed to have been waived, nor
          shall there be any estoppel against the enforcement of any provision of this
          Agreement, except by written instrument of the party charged with such waiver or
          estoppel. No such written waiver shall be deemed a continuing waiver unless
          specifically stated therein, and each such waiver shall operate only as to the
          specific term or condition waived and shall not constitute a waiver of such term
          or condition for the future or as to any act other than that specifically
          waived.

9.    
          REINSTATEMENT OF BENEFITS UNDER BANK AGREEMENT.

In
the event Executive is suspended and/or temporarily prohibited from participating in the
conduct of the Banks affairs by a notice served under Section 8(e)(3)
(12 USC Section 1818(e)(3)) or 8(g) (12 USC Section 1818(g)) of the Federal
Deposit Insurance Act, as amended by the Financial Institutions Reform, Recovery and
Enforcement Act of 1989, during the term of this Agreement and a Change in Control, as
defined herein, occurs, the Holding Company will assume its obligation to pay and the
Executive will be entitled to receive all of the termination benefits that may be provided
under any special termination agreement between the Executive and the Bank, upon the
notification of the Holding Company of the Banks receipt of a dismissal of charges
in the Notice.

10.    
          EFFECT OF ACTION UNDER BANK AGREEMENT.

Notwithstanding
any provision herein to the contrary, to the extent that payments and benefits are paid to
or received by Executive under a special termination agreement between Executive and Bank,
such payments and benefits paid by the Bank will be deemed to satisfy the corresponding
obligations of the Holding Company under this Agreement.

11. SEVERABILITY.

If,
for any reason, any provision of this Agreement, or any part of any provision, is held
invalid, such invalidity shall not affect any other provision of this Agreement or any
part of such provision not held so invalid, and each such other provision and part thereof
shall to the full extent consistent with law continue in full force and effect.

12.    
          HEADINGS FOR REFERENCE ONLY.

The
headings of sections and paragraphs herein are included solely for convenience of
reference and shall not control the meaning or interpretation of any of the provisions of
this Agreement.

---

13.    
          GOVERNING LAW.

The
validity, interpretation, performance, and enforcement of this Agreement shall be governed
by the laws of the State of Delaware.

14.    
 ARBITRATION.

Any
dispute or controversy arising under or in connection with this Agreement shall be settled
exclusively by arbitration in accordance with the rules of the American Arbitration
Association then in effect. Judgment may be entered on the arbitrators award in any
court having jurisdiction; provided, however, that Executive shall be entitled to seek
specific performance of his right to be paid until the Date of Termination during the
pendency of any dispute or controversy arising under or in connection with this Agreement.

15.    
          PAYMENT OF LEGAL FEES.

All
reasonable legal fees paid or incurred by Executive pursuant to any dispute or question of
interpretation relating to this Agreement shall be paid or reimbursed by the Holding
Company, if the Executive is successful in any material part. Such payments are guaranteed
by the Company pursuant to Section 5 hereof.

16.    
SIGNATURES.

IN
WITNESS WHEREOF, the Holding Company has caused this Agreement to be executed by its duly
authorized officer, and Executive has signed this Agreement to be effective on the 1st day
of October 2006.

|                    |  | 
|------------------- |  | 
|Attest:             |  | 
|                    |  | 
|/s/_Carolyn Pihera  |  | 
|Corporate Secretary |  | 
|                    |  | 
|WITNESS:            |  | 
|                    |  | 
|/s/ Michael Janssen |  | 
|                    |  | 

Seal