<PAGE>

                                                                    EXHIBIT 10.2

                  EIGHTH AMENDMENT TO RESTATED CREDIT AGREEMENT

      This Eighth Amendment to Restated Credit Agreement (the "Amendment") is
entered into as of this 30th day of August, 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 The definition of "Maturity Date" in Section 1 of the Credit Agreement
is hereby amended and restated in its entirety as follows:

      " "Maturity Date" shall mean:

      (a)   with respect to the Revolving Credit Loan, November 1, 2004; and

      (b)   with respect to the Term Loan, July 1, 2006."

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.

                                     - 1 -
<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.

                                     - 2 -
<PAGE>

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

                                            MEADOWBROOK INSURANCE GROUP, INC.,
                                            a Michigan corporation

                                            By:_________________________________
                                                  Robert S. Cubbin
                                            Its:  President

                                            COMERICA BANK,
                                            a Michigan banking corporation

                                            By:_________________________________

                                                  Julie J. Nowicki
                                            Its:  Assistant Vice President

                                     - 3 -
<PAGE>

                                   EXHIBIT "A"

                                CLOSING CHECKLIST

                               EIGHTH AMENDMENT TO
                        MEADOWBROOK INSURANCE GROUP, INC.
                            RESTATED CREDIT AGREEMENT
                                      WITH
                                  COMERICA BANK

                                 AUGUST 30, 2004

I.    AUTHORIZING DOCUMENTS

      A.    Meadowbrook Insurance Group, Inc.

            1.    Recertification of Authority Documents

            2.    Good Standing Certificate (Michigan) (previously delivered)

II.   LOAN DOCUMENTS

            3.    Eighth Amendment to Restated Credit Agreement

            4.    Reaffirmation of Guaranties

                                     - 4 -