Document:

<PAGE>
                                                                    EXHIBIT 10.1

                              TRI-PARTY AGREEMENT

         THIS AGREEMENT is made on March 24, 2004, by Meadowbrook Insurance
Group, Inc., 26600 Telegraph Road, Southfield, Michigan 48034-2438
("Meadowbrook"), Kirco Development LLC, 101 West Big Beaver Road, Suite 200,
Troy, Michigan 48084-5255 ("Kirco"), and Standard Federal Bank N.A., a national
banking association, 3600 Big Beaver Road, Troy, Michigan 48084 ("Standard
Federal").

                                    RECITALS:

         A. Meadowbrook and Kirco are parties to a Development Agreement dated
December 3, 2003 (the "Development Agreement"), under which Kirco agreed to
construct an office building consisting of 72,000 gross square feet and related
improvements (the "Project") on a parcel of real estate owned by Meadowbrook
(the "Property").

         B. The Development Agreement contemplated that Kirco would obtain
construction financing for the Project, and that Kirco, Meadowbrook and the
construction lender would enter into a Tri-Party Agreement.

         C. Standard Federal Bank has committed to provide to Kirco construction
financing for the Project (the "Construction Loan"). The Construction Loan is
evidenced and secured by a Construction Loan Agreement, an Assignment of
Development Agreement, a mortgage on the Building and on the Real Estate and
related documents (the "Construction Loan Documents").

         Wherefore the parties agree as follows:

         1. Agreements of Standard Federal. Standard Federal agrees as follows:

              (a) So long as this Agreement is in effect, the Construction Loan
         Documents shall not be amended without the prior written consent of
         Meadowbrook and Kirco, which consent shall not be unreasonably withheld
         or delayed. Subject to fulfillment of the terms and conditions of the
         Construction Loan and the Construction Loan Documents, Standard Federal
         shall close and disburse the Construction Loan to Kirco to finance
         construction of the Building in accordance with the terms of the
         Construction Loan Documents;

              (b) Standard Federal will, upon written request from Meadowbrook,
         from time to time, confirm that the Construction Loan is in full force
         and effect, if such is the fact.

              (c) Standard Federal agrees not to accelerate the Construction
         Loan or exercise any remedies with respect to the Construction Loan,
         prior to ten days after written notice of the default to Meadowbrook;

<PAGE>

         2. Agreements of Kirco. Kirco hereby covenants, represents and warrants
to Standard Federal and Meadowbrook that it shall:

              (a) Comply in all respects with the terms and conditions contained
         in the Construction Loan Documents;

              (b) Comply in all respects with the terms and conditions contained
         in the Development Agreement; and

              (c) Notify Standard Federal in writing of any default by
         Meadowbrook under the Development Agreement. Kirco will not take any
         action under the Development Agreement on account of such default
         without Standard Federal's prior written consent.

         3. Agreements of Meadowbrook. Meadowbrook hereby approves the
Construction Loan Documents. In addition, Meadowbrook hereby covenants,
represents and warrants to Standard Federal as follows:

              (a) So long as this Agreement is in full force and effect, the
         Development Agreement shall not be amended or terminated without the
         prior written consent of Standard Federal;

              (b) Meadowbrook shall notify Standard Federal, in writing,
         concurrently with any notification to Kirco, of any default by Kirco
         under the terms of the Development Agreement (hereinafter, a
         "Default"). Meadowbrook acknowledges that a Default under the
         Development Agreement will be an Event of Default under the
         Construction Loan Agreement, upon which Standard Federal may exercise
         the rights described in 3(c) below, whether or not Standard Federal
         attempts to cure or cures the Default. Meadowbrook agrees that, prior
         to exercising any right with respect to such Default (including the
         termination of the Development Agreement or the refusal to fund any
         payment thereunder), Standard Federal shall have the right, but not the
         obligation, to cure such Default (x) within twenty (20) days after such
         written notice, or (y) when the cure reasonably requires more than
         twenty (20) days, to commence to cure such Default within such period
         of twenty (20) days and to diligently and continuously prosecute such
         cure to completion, so long as such Default is cured on or before the
         applicable substantial completion date under the Development Agreement;

              (c) Upon an Event of Default under the Construction Loan
         Documents, including but not limited to an Event of Default arising due
         to Kirco's Default under the Development Agreement, whether or not
         Standard Federal is attempting to cure or has cured such Default,
         Standard Federal shall be able to avail itself of all of the rights of
         Kirco under the Development Agreement, including but not limited to:
         (i) the right to complete construction of the Building, (ii) the right
         to receive all payments due from Meadowbrook under the Development
         Agreement, (iii) Kirco's option to purchase the Property, (iv) the
         option to require Meadowbrook to lease the property, and (v) the right
         to assert all lien rights that Kirco may have, all as provided in and
         subject to the terms and conditions of the Development Agreement.

<PAGE>

              (d) The Development Agreement is the full and final agreement of
         Meadowbrook and Kirco with respect to the construction of the Project,
         is in full force and effect as of the date thereof, there are no known
         breaches or defaults by Kirco thereunder and Meadowbrook has no actual
         knowledge of any facts which would entitle Meadowbrook to declare a
         default under the Development Agreement; and

              (e) Meadowbrook will, upon written request from Standard Federal,
         from time to time, confirm that the Development Agreement is in full
         force and effect, if such is the fact.

              (f) The Contract Price payable by Meadowbrook under the
         Development Agreement shall be paid to Standard Federal, upon
         satisfaction of all conditions to such payment in the Development
         Agreement, and subject to any offsets permitted under the Development
         Agreement, but without any other offsets or deductions, and applied to
         the Construction Loan balance. Standard Federal will pay any excess to
         Kirco.

              (g) Standard Federal will have a right of first offer with respect
         to any financing of the Project that Meadowbrook proposes to obtain.
         For purposes of this section, "right of first offer" means the
         following: if Meadowbrook decides to obtain bank financing of the
         Project, Meadowbrook will notify Standard Federal and will allow
         Standard Federal to provide a proposal for any such financing.

         4. Regarding the Development Agreement.

              (a) Concurrently herewith, Meadowbrook and Kirco have executed and
         delivered to Standard Federal a mortgage on the project to secure the
         Construction Loan. Meadowbrook and Kirco acknowledge and agree that
         execution and delivery of that mortgage satisfies the provisions of the
         Development Agreement requiring a mortgage. To the extent the mortgage
         as executed and delivered is different from that described in the
         Development Agreement, any differences are waived. Standard Federal
         agrees to release the mortgage as to Phase 2 of the Project, upon the
         request of Meadowbrook (provided that Phases 1 and 2 of the Project
         have been properly split and separated for tax purposes.

              (b) Meadowbrook and Kirco also agree to waive any conditions in
         the Development Agreement relating to Kirco's acquisition of
         construction financing, including, but not limited to, any provision
         that gives Meadowbrook an option to terminate the agreement if Kirco
         fails to obtain a Construction Loan.

              (c) Meadowbrook acknowledges and agrees that Kirco has assigned to
         Standard Federal, as collateral for the Construction Loan, all of
         Kirco's rights under the Development Agreement. Meadowbrook
         acknowledges and agrees that, as of the date hereof, Standard Federal
         has not assumed any of Kirco's obligations under the Development
         Agreement.

         5. Regarding the Construction of the Project.

<PAGE>

              (a) No changes in the plans and specifications for the Building
         which would result in increasing the construction cost by more than
         $100,000 in the aggregate will be made without Standard Federals'
         consent.

              (b) Standard Federal's loan documentation will require
         Meadowbrook's consent to all construction advances prior to submittal
         of the advance request to Standard Federal. Meadowbrook will inspect
         the Project periodically and not more than once per week. Meadowbrook's
         consent to a Construction Loan advance shall be deemed a representation
         to Standard Federal and Kirco that work to be paid for by the advance,
         and all work previously completed is satisfactory to Meadowbrook, but
         will not constitute a waiver of any claims Meadowbrook has against
         Kirco for any defects in the work that reasonably could not be
         discovered by Meadowbrook's inspections as provided above.

              (c) Nothing herein shall constitute a waiver or release of Kirco
         or Meadowbrook from any of their respective obligations under the
         Development Agreement.

         6. Notices. Any notices provided for herein must be given in writing
and may be given by sending such notice by United States certified mail, postage
prepaid, return receipt requested, to the addresses of the parties referred to
on the face page hereof, or by sending such notice by expedited delivery service
(such as, but not limited to, Federal Express). The address of any party may be
changed by such party by delivery of written notice in the manner provided
herein. Any notice given by certified mail in the manner provided herein shall
be effective three (3) business days after deposit in the United States mail,
and any notice given by expedited delivery service shall be effective, when
received.

         7. Successors; Modifications. The covenants, agreements, rights and
remedies contained in this Agreement shall be binding upon and inure to the
benefit of the parties hereto and their respective successors and assigns;
provided, however, that neither Standard Federal nor Meadowbrook may assign this
Agreement, or any rights or interest hereunder, without the prior written
consent of the other. This Agreement may not be changed, terminated or modified
in any manner other than by written agreement signed by the parties hereto.

         8. Third Party Rights. Except as set forth herein, Kirco agrees that in
no event shall Kirco or any third party have any rights against either Standard
Federal or Meadowbrook arising out of this Agreement; it being understood that
this Agreement is being made at Kirco's request and to induce Meadowbrook to
undertake, for the benefit of Standard Federal, the obligations of Meadowbrook
set forth herein. This Agreement is not for the benefit of Kirco or any third
party, and Kirco is joining in the execution of this Agreement solely for the
purpose of assuming obligations for the benefit of Standard Federal and
Meadowbrook.

         9. Governing Law. This Agreement shall be governed by and construed in
accordance with the laws of the State of Michigan.

         10. Modifications. This Agreement may be amended only by a written
document executed by all parties hereto.

<PAGE>

         11. Counterparts. This Agreement may be executed in two or more
counterparts, all of which, together, shall constitute one and the same
agreement.

         IN WITNESS WHEREOF, the parties hereto have executed this Tri-Party
Agreement as of the day and year first above written.

                                          Meadowbrook Insurance Group, Inc., a
                                          Michigan corporation

                                          By: S/Robert S. Cubbin
                                              ----------------------------------
                                                   Robert S. Cubbin
                                          Its:     President and CEO

                                          Kirco Development LLC, a Michigan
                                          limited liability company

                                          By: S/
                                              ----------------------------------

                                          Its:     President
                                              ----------------------------------

                                          Standard Federal Bank N.A., a national
                                          banking association

                                          By: S/
                                              ----------------------------------

                                          Its:     VP
                                              ----------------------------------<PAGE>
                                                                    EXHIBIT 10.2

                 FOURTH AMENDMENT TO RESTATED CREDIT AGREEMENT

         This Fourth Amendment to Restated Credit Agreement (the "Amendment") is
entered into as of this 29th day of April, 2004, by and between COMERICA BANK, a
Michigan banking corporation ("Bank"), with offices at One Detroit Center, 500
Woodward Avenue, Detroit, Michigan 48226, and MEADOWBROOK INSURANCE GROUP, INC.,
a Michigan corporation, with offices at 26600 Telegraph Road, Suite 300,
Southfield, Michigan 48034 ("Borrower").

                                    RECITALS:

         A. Borrower and Bank entered into a certain Restated Credit Agreement
dated as of September 25, 2002 (as amended from time to time, the "Agreement")
pursuant to which Borrower incurred certain indebtedness and obligations and
granted the Bank certain security for such indebtedness and obligations; and

         B. WHEREAS, Borrower and Bank desire to amend the Agreement upon the
following terms and conditions.

         NOW THEREFORE, for good and valuable consideration, the parties agree
as follows:

1.       DEFINITIONS

         1.1 Capitalized terms used herein and not defined to the contrary have
the meanings given them in the Agreement.

2.       AMENDMENT TO AGREEMENT

         2.1 Section 1 of the Credit Agreement is amended by inserting the
following definitions of "Dekania II Obligations" and "Dekania II Term Sheet" in
appropriate alphabetical order:

         "Dekania II Obligations" shall mean the obligations of Borrower as
         either the Issuer or Guarantor of the "Securities" as defined in and
         described by the Dekania II Term Sheet.

         "Dekania II Term Sheet" means that certain Final Term Sheet issued by
         Dekania CDO II, Ltd., as Purchaser, delivered to and accepted by
         Borrower as of April 29, 2004 (a true copy of which has been delivered
         to Bank).

         2.2 Section 9.1 of the Credit Agreement is hereby amended by replacing
the period at the end of clause (k) thereof with a semicolon and inserting,
thereafter, the following:

         "(l) from and after the closing on and issuance of the "Securities" as
         described in and on terms consistent with the Dekania Term Sheet, the
         Dekania Obligations; and

                                      -1-

<PAGE>

         (m) from and after the closing on and issuance of the "Securities" as
         described in and on terms consistent with the Dekania II Term Sheet,
         the Dekania II Obligations."

         2.3 Section 9.3 of the Agreement is hereby amended and restated in its
entirety as follows:

         "9.3 Limitation on Guarantee Obligations. Create, incur, assume or
         suffer to exist any Guarantee Obligation except:

         (a) pursuant to the Loan Documents;

         (b) from and after the closing on and issuance of the "Securities" as
         described in and on terms consistent with the Dekania Term Sheet, the
         Dekania Obligations; and

         (c) from and after the closing on and issuance of the "Securities" as
         described in and on terms consistent with the Dekania II Term Sheet,
         the Dekania II Obligations."

         2.4 Section 10.1(g)of the Agreement is hereby amended and restated in
its entirety as follows:

         "(g) default (i) in the payment of any indebtedness for borrowed money
         (other than Indebtedness hereunder) of Company or any Subsidiary in
         excess of One Hundred Thousand Dollars ($100,000) in the aggregate when
         due (whether by acceleration or otherwise) and continuance thereof
         beyond any applicable period of cure; (ii) in the payment of any
         indebtedness in connection with the Dekania Obligations and/or the
         Dekania II Obligations when due (whether by acceleration or otherwise)
         and continuance thereof beyond any applicable period of cure; or (iii)
         failure to comply with the terms of any other obligation of Company or
         any Subsidiary with respect to any indebtedness for borrowed money
         (other than Indebtedness hereunder) in excess of One Hundred Thousand
         Dollars ($100,000) in the aggregate, which with the giving of notice or
         passage of time or both would permit the holder or holders thereto to
         accelerate such other indebtedness for borrowed money or terminate its
         commitment thereunder, as applicable;"

3.       REPRESENTATIONS

         Borrower hereby represents and warrants that:

         3.1 Execution, delivery and performance of this Amendment and any other
documents and instruments required under this Amendment are within Borrower's
powers, have been duly authorized, are not in contravention of law or the terms
of Borrower's articles of incorporation/charter, or bylaws, and do not require
the consent or approval of any governmental body, agency, or authority.

                                      -2-
<PAGE>

         3.2 This Amendment and any other documents and instruments required
under this Amendment or the Agreement, when issued and delivered under this
Amendment or the Agreement, will be valid and binding in accordance with their
terms.

         3.3 The continuing representations and warranties of Borrower set forth
in Sections 7.1 through 7.19 of the Agreement are true and correct on and as of
the date hereof with the same force and effect as made on and as of the date
hereof.

         3.4 Except as previously disclosed to Bank in writing, no default or
event of default, or condition or event which, with the giving of notice or the
running of time, or both, would constitute a Default or Event of Default under
the Notes or the Agreement, has occurred and is continuing as of the date
hereof.

4.       MISCELLANEOUS

         4.1 This Amendment may be executed in as many counterparts as Bank and
Borrower deem convenient, and shall become effective upon: (a) delivery to Bank
of all executed counterparts hereof; and (b) delivery to Bank, in form and
substance satisfactory to Bank of each of the documents, instruments and fees
listed on the Checklist attached as Exhibit "A" hereto.

         4.2 Borrower and Bank acknowledge and agree that except as specifically
amended hereby, all of the terms and conditions of the Agreement and the Notes
and loan documents related thereto (collectively, the "Loan Documents") remain
in full force and effect in accordance with their original terms.

         4.3 Borrower shall pay all of Bank's legal costs and expenses
(including attorneys' fees and expenses) incurred in the negotiation,
preparation and closing hereof, including, without limitation, costs of all lien
searches and financing statement filings.

         4.4 Except as specifically set forth herein, nothing set forth in this
Amendment shall constitute, or be interpreted or construed to constitute, a
waiver of any right or remedy of Bank, or of any default or event of default
whether now existing or hereafter arising and whether now known or hereafter
discovered by or disclosed to Bank.

         4.5 Bank expressly reserves the right to exercise any or all rights and
remedies provided under the Loan Documents and applicable law except as modified
herein. Bank's failure to immediately exercise such rights and remedies shall
not be construed as a waiver or modification of those rights or an offer of
forbearance.

         4.6 Borrower, in every capacity, hereby waives, discharges and forever
releases Bank, Bank's employees, officers, directors, attorneys, stockholders
and successors and assigns, from and of any and all claims, causes of action,
defenses, counterclaims or offsets Borrower may have or may have made which (in
any case) could be based on facts or circumstances known to Borrower as of the
date of this Amendment, against any or all of Bank, Bank's employees, officers,
directors, attorneys, stockholders and successors and assigns.

                                      -3-
<PAGE>

         IN WITNESS WHEREOF, this Amendment has been executed as of the day
first stated above.

                                     MEADOWBROOK INSURANCE GROUP, INC.,
                                     a Michigan corporation

                                     By: /s/ Robert S. Cubbin
                                         --------------------------------
                                              Robert S. Cubbin
                                     Its:     President

                                     COMERICA BANK,
                                     a Michigan banking corporation

                                     By: Julie J. Nowicki
                                         --------------------------------
                                              Julie J. Nowicki
                                     Its:     Assistant Vice President

                                      -4-

Source: [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00066-of-00352.parquet"}, [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00066-of-00352.parquet"}]]