<PAGE>

                                                                    Exhibit 10.4

                                                        EXECUTION DRAFT

                      SECOND WAIVER AND AMENDMENT AGREEMENT

        THIS SECOND WAIVER AND AMENDMENT AGREEMENT (this "AGREEMENT") is entered
into as of March 15, 1999 among Medical Resources, Inc. (the "COMPANY") and the
institutional investors party hereto (the "PURCHASERS"). The Purchasers are
collectively the holders of not less than a majority of the $52,000,000 in
aggregate principal amount originally outstanding of the Company's 7.77% Senior
Notes due February 20, 2005 (the "7.77% NOTES") issued pursuant to a Note
Purchase Agreement dated as of February 20, 1997 (the "FEBRUARY NOTE AGREEMENT")
and not less than a majority of the $20,000,000 in aggregate principal amount
originally outstanding of the Company's 8.10% Senior Notes due February 20, 2005
(the "8.10% NOTES") and the $6,000,000 in aggregate principal amount originally
outstanding of the Company's 8.01% Senior Notes due February 20, 2005 (the
"8.01% NOTES" and together with the 7.77% Notes and the 8.10% Notes, the
"NOTES") issued pursuant to a Note Purchase Agreement dated as of June 26, 1997
(the "JUNE NOTE AGREEMENT" and together with the February Note Agreement, each
as amended by the First Waiver Agreement (defined below) the "NOTE AGREEMENTS").
Capitalized terms not otherwise defined in this Agreement have the meanings
given therefor in the Note Agreements.

        WHEREAS, the Note Agreements have previously been amended by a Waiver
and Amendment Agreement dated September 23, 1998 (the "FIRST WAIVER AGREEMENT");
and

        WHEREAS, the Company, certain officers and directors of the Company and
the attorneys representing the plaintiffs in the class action lawsuits currently
pending against the Company have entered into an agreement-in-principle, dated
December 18, 1998 (the "CLASS ACTION SETTLEMENT AGREEMENT"), to settle such
class actions, and the Company has requested the consent of the Purchasers to
consummate the Class Action Settlement Agreement; and

        WHEREAS, the Company has advised the Purchasers that it is not currently
in compliance with certain of its covenants set forth in the Note Agreements and
has requested that the Purchasers amend certain of the financial covenants set
forth in the Note Agreements; and

        WHEREAS, the Purchasers are willing to do so on the terms and conditions
of this Agreement.

NOW, THEREFORE, the parties agree:

        1. CONSENT TO CLASS ACTION SETTLEMENT. The Purchasers hereby consent to
the consummation of the transactions contemplated by the Class Action Settlement
Agreement attached as EXHIBIT I on terms and conditions materially consistent
with the terms and conditions set forth therein; SUBJECT TO THE CONDITION,
HOWEVER, that the Settlement Notes (as defined in Section 2 below) to be issued
in connection with the Class Action Settlement Agreement shall bear interest,
shall be payable and shall be subordinate to the Notes strictly in accordance
with the terms and conditions set forth in EXHIBIT I and
<PAGE>

shall otherwise be in form and substance satisfactory to the Required Holders.

        2. AMENDMENT TO NOTE AGREEMENTS. Subject to the delivery by the Company
of the items set forth in Section 3, the Note Agreements are hereby amended
effective as of December 31, 1998 as follows:

        (a) The following definitions to the Note Agreements are amended and
restated:

              "CONSOLIDATED EBITA" means for any period the amount of which is
        to be determined, Consolidated Net Income for such period PLUS (but only
        to the extent such amounts were included in the computation of
        Consolidated Net Income and without duplication) (i) Consolidated
        Interest Expense excluding any interest paid on the Settlement Notes,
        (ii) income tax expense (including deferred income tax expense in each
        case), (iii) amortization expense of the Company and its Restricted
        Subsidiaries for such period, (iv) minority interest, (v) the aggregate
        amount of charges in such period associated with (A) ongoing expenses
        and/or charges related to litigation commenced against the Company prior
        to January 1, 1998 including interest paid on the Settlement Notes, but
        excluding such expenses or interest (net of any insurance proceeds paid
        to the Company in respect of such expenses) paid in cash by the Company
        after September 23, 1998 in excess of $1,000,000 in the aggregate, to
        the extent of such excess, (B) closings or dispositions, publicly
        announced prior to August 1, 1998, of Company facilities, but excluding
        expenses paid in cash in excess of $1,500,000 in the aggregate, to the
        extent of such excess, (C) on-going expenses and/or charges incurred
        after January 1, 1999 associated with (x) the closing or disposition of
        additional centers during 1999 and (y) the Company's equipment
        technology upgrade plan but excluding any such expenses and costs paid
        in cash by the Company in excess of $1,000,000 in the aggregate, to the
        extent of such excess and any such non-cash costs or expenses in excess
        of $600,000 in the aggregate, to the extent of such excess and (D)
        aggregate penalty payments owing to RGC as of September 23, 1998
        (excluding the September 1998 Penalty) not exceeding $2,520,000
        (exclusive of interest) incurred as a result of the failure of the
        Company to timely fulfill its registration obligations with respect to
        the shares of the Company's common stock into which the RGC's Series C
        Preferred Stock is convertible, as set forth on SCHEDULE 10B; (E) stock
        option based compensation relating to employee stock options granted on
        or before December 31, 1997, (F) charges associated with the issuance of
        the Warrants, less (but only to the extent included in the computation
        of Consolidated Net Income) any gain recognized by the Company
        associated with the sale of stock of certain of its Unrestricted
        Subsidiaries pursuant to the Stock Purchase Agreement, such amounts
        being determined in each case on a consolidated basis in accordance with
        GAAP; (G) for the three months ended December 31, 1998, the Fiscal 1998
        Bad Debt Adjustment; and (H) for the three months ended December 31,
        1998, the September 1998 Penalty, PROVIDED, if at any time after
        December 31, 1998 demand for or any other action to obtain
        payment of (whether in cash or in stock) the September 1998 Penalty is
        made or taken or the obligations of the Company thereunder are
        represented by 


                                       2
<PAGE>

        a note or other instrument, then the September 1998 Penalty shall be
        deemed to have been incurred by the Company on such date and
        Consolidated EBITA for any period which includes such date shall be
        reduced by an amount equal to the September 1998 Penalty and PROVIDED,
        FURTHER, if at any time after December 31, 1998 all or any portion of
        the September 1998 Penalty is waived by RGC or the Persons entitled
        thereto, for the purposes of calculating Consolidated EBITA, any
        adjustment to Consolidated Net Income as a result of such waiver shall
        be made effective as of December 31, 1998.

              "CONSOLIDATED NET WORTH" means as of any date, the amount of which
        is to be determined, (i) Consolidated Total Assets MINUS (ii)
        consolidated total liabilities of the Company and its Restricted
        Subsidiaries, as determined in accordance GAAP PLUS (iii) (but only to
        the extent such amounts have been included in the consolidated total
        liabilities of the Company and its Restricted Subsidiaries as of such
        date) (A) the then outstanding principal amount of the Settlement Notes;
        (B) except for the purposes of PARAGRAPH 6A(4), the Fiscal 1998 Bad Debt
        Adjustment; and (C) except for the purposes of PARAGRAPH 6A(4), the
        September 1998 Penalty, but only if on or prior to such date no demand
        for or other action to obtain payment of (whether in cash or in stock)
        the September 1998 Penalty has been made or taken and the obligations of
        the Company thereunder are not then represented by a note or other
        instrument. For the purposes of PARAGRAPH 6A(4), Consolidated Net Worth
        shall be determined as of any date without adding the amount of the
        Fiscal 1998 Bad Debt Adjustment or the September 1998 Penalty included
        in the consolidated total liabilities of the Company and its Restricted
        Subsidiaries as of such date.

              "CONSOLIDATED TOTAL DEBT" means, as of any date as the amount of
        which is to be determined, all Debt of the Company and its Restricted
        Subsidiaries determined on a consolidated basis in accordance with GAAP
        less the then outstanding principal amount of the Settlement Notes.

              "RESTRICTED PAYMENTS" means the declaration, payment or making,
        directly or indirectly, of any dividend, payment or other distribution
        on or in respect of any Equity Interest of the Company or any Restricted
        Subsidiary (other than the payment of a dividend, payment or other
        distribution to the Company or Wholly-Owned Restricted Subsidiary or the
        setting apart of any funds or property therefor, or the making of any
        payment on account of the purchase, redemption, retirement or other
        acquisition, direct or indirect, of any Equity Interest of the Company
        or any Restricted Subsidiary (other than any such Equity Interest owned
        by the Company or a Wholly-Owned Restricted Subsidiary) including
        without limitation, (x) the forgiveness or foreclosure by the issuer of
        any Debt secured by a pledge of such capital stock, (y) any purchase,
        redemption or other acquisition or retirement for value prior to any
        scheduled maturity, any scheduled prepayment of principal or any
        scheduled sinking fund payment or, in any event, during the continuance
        of any Default, or Event of Default of any Debt that is subordinated in
        right of payment to the Notes and (z) cash payments after June 30, 1998
        (net of any insurance proceeds paid to the Company


                                       3
<PAGE>

        in respect thereof) in respect of shareholder litigation, including,
        without limitation, in respect of the Settlement Notes; PROVIDED, the
        issuance of the Settlement Notes (but not any payments made in respect
        thereof), the first $1,000,000 of cash interest paid on the Settlement
        Notes (provided such payment is permitted under the subordination
        provisions of the Settlement Notes) and the Repurchase Obligations shall
        not constitute Restricted Payments.

        (b) The following definitions are added to the Note Agreements in the
appropriate alphabetical order:

              "FISCAL 1998 BAD DEBT ADJUSTMENT" means the amount of $10,506,000,
        PROVIDED, HOWEVER, if after March 15, 1999, the amount of uncollectible
        accounts receivable, together with the provision for uncollectible
        accounts receivable of the Company's Type III imaging centers (as
        defined in the footnotes to the Company's audited financial statements
        for its fiscal year ended December 31, 1998) otherwise reflected as a
        reduction of net service revenues, for the 12 months ended on December
        31, 1998 (the "FISCAL 1998 BAD DEBT RESERVE") is restated in accordance
        with GAAP to a number which is less than $19,415,000, the Fiscal 1998
        Bad Debt Adjustment shall be reduced, dollar for dollar by the amount
        which the Fiscal Bad Debt Reserve is reduced below $19,415,000.

              "RGC" means RGC International, LDC.

              "SEPTEMBER 1998 PENALTY" means the one time penalty of $1,550,000
        which RGC is entitled to elect to receive as a result of the Company
        failing to have registered the shares of Common Stock issuable upon
        conversion of RGC's Series C Convertible Preferred Stock by September
        15, 1998.

              "SETTLEMENT NOTES" means the convertible subordinated promissory
        notes of the Company issued in the aggregate original principal amount
        of $5,250,000 in connection with the consummation of the transactions
        contemplated under the terms of the Memorandum of Understanding, dated
        December 18, 1998, among the Company, certain of its officers and
        directors and representatives of the plaintiffs in the class action
        lawsuits commenced against the Company PROVIDED, the form and substance
        of such Notes have been approved by the Required Holders prior to
        issuance.

        (c) Paragraph 6A(2) of each Note Agreement is amended to provide that
the required ratio for the fiscal period ending June 30, 1999 shall be 1.92 to
1.00 instead of 2.02 to 1.00.

        (d) Paragraph 6B of each Note Agreement is amended and restated in its
entirety:

              "RESTRICTED PAYMENTS AND RESTRICTED INVESTMENTS. The Company and
        the Restricted Subsidiaries shall not make, declare or incur any
        liability to make any 


                                       4
<PAGE>

        Restricted Payments or any Restricted Investments after the Closing Date
        unless (i) immediately after giving effect thereto, the aggregate amount
        of all Restricted Payments made or declared by the Company and its
        Restricted Subsidiaries since December 31, 1995 plus the aggregate value
        of all Restricted Investments at such time does not exceed the sum of
        (a) $10,000,000 plus (b) 50% of Consolidated Net Income for each full
        fiscal year ended after December 31, 1995 (or if Consolidated Net Income
        for any such year is a loss, then 100% of Consolidated Net Income for
        such year, expressed as a negative number) plus (c) the Net Proceeds of
        Eligible Capital Stock received by the Company after December 31, 1996
        minus (d) the amount of cash interest then paid on the Settlement Notes
        up to $1,000,000; and (ii) no Event of Default or Default exists
        immediately before or immediately after making or declaring such
        Restricted Payment or Restricted Investment or would otherwise be
        reasonably expected to result therefrom; PROVIDED, in no event shall the
        Company or its Restricted Subsidiaries be permitted to prepay principal
        on the Settlement Notes or make any payment in respect of the Settlement
        Notes in contravention of the subordination provisions of the Settlement
        Notes."

        (e) Clause (x) of paragraph 5A of each Note Agreement is amended and
        restated in its entirety:

              "(x) promptly, but not later than 20 days following the end of
        each calendar month, a cash flow and accounts receivable aging report
        for such month accompanied by a reconciliation of the actual versus
        projected cash flows."

        3. REPRESENTATIONS AND WARRANTIES.

        (a) Subject to the disclosure schedules attached to the June Note
Agreement and the updated disclosure schedules attached to this Agreement, each
of the representations and warranties set forth in paragraph 8 of each Note
Agreement is true and correct in all material respects on and as if made as of
the date hereof and after giving effect to the transactions contemplated by this
Agreement.

        (b) The Company has furnished the Purchasers with the audited balance
sheet of the Consolidated Group dated as of December 31, 1998 and the related
statements of operations, cash flows and stockholders' equity for the 12 months
ended on such date. The audited financial statements fairly present in all
material respects the financial condition of the Consolidated Group and the
results of its operations and cash flows for the respective periods specified
thereby. The audited financial statements have been prepared in accordance with
GAAP, consistently applied throughout the periods involved except as set forth
in the notes thereto. Since December 31, 1998, there have been no developments
or changes affecting the business, assets, liabilities, condition (financial or
otherwise) of the Company or any Restricted Subsidiary which has had or is
reasonably expected to have, either individually or in the aggregate, a Material
Adverse Effect.

        (c) As of the date hereof, the Company has no direct or indirect equity
or 


                                       5
<PAGE>

beneficial ownership in any Unrestricted Subsidiary.

        (d) As of the date hereof, no demand for or any other action to obtain
payment of (whether in cash or in stock) the September 1998 Penalty has been
made or taken and the obligations of the Company thereunder are not represented
by a note or other instrument.

      4. DELIVERIES. Concurrently with the execution and delivery of this
Agreement by the Company, the Company shall deliver to the Purchasers:

      (a) OPINION OF COUNSEL. An opinion of Willkie, Farr & Gallagher as to (i)
the legal existence and corporate power and authority of the Company, (ii) the
due authorization, execution, delivery and enforceability of this Agreement,
(iii) the absence of conflicts with or creation of liens under applicable law in
connection therewith and (iv) the absence of any required governmental consents
in connection therewith, in form and substance satisfactory to the Purchasers.

      (b) PAYMENT OF EXPENSES. All Expenses, including those of Special Counsel,
as set forth in invoices delivered to the Company prior to the date hereof shall
have been paid in full by the Company.

      (c) INTEREST PAYMENTS. All interest accrued and payable on each Note has
been paid by the Company as of the date hereof.

      5. NO OTHER WAIVERS. Except as expressly set forth herein or as previously
amended, the Note Agreements shall continue in full force and effect without
alteration or amendment and except as expressly set forth herein no other waiver
of any Default or Event of Default is hereby granted.

      6. GOVERNING LAW. THIS AGREEMENT IS TO BE CONSTRUED AND ENFORCED IN
ACCORDANCE WITH, AND THE RIGHTS OF THE PARTIES SHALL BE GOVERNED BY, THE LAWS OF
THE STATE OF NEW YORK (WITHOUT GIVING EFFECT TO ANY LAWS OR RULES RELATING TO
CONFLICTS OF LAWS THAT WOULD CAUSE THE APPLICATION OF THE LAWS OF ANY
JURISDICTION OTHER THAN THE STATE OF NEW YORK).

      7. COUNTERPARTS. This Agreement may be executed simultaneously in two or
more counterparts, each of which shall be deemed an original, and it shall not
be necessary in making proof of this Agreement to produce or account for more
than one such counterpart.


                                       6
<PAGE>

      This Agreement is executed under seal as of the date first above written.

                                 MEDICAL RESOURCES, INC.


                                 By: /s/ Chris Joyce
                                     -----------------------------------

                                       Title:


                                       7
<PAGE>

                                 Purchasers under the February
                                 Note Agreement:

                                 JOHN HANCOCK MUTUAL LIFE
                                 INSURANCE COMPANY


                                 By: /s/ Stephen J. Blewitt
                                     ----------------------------------
                                     Name: Stephen J. Blewitt
                                     Title:


                                 JOHN HANCOCK VARIABLE LIFE
                                 INSURANCE COMPANY


                                 By: /s/ Stephen J. Blewitt
                                     ----------------------------------
                                     Name: Stephen J. Blewitt
                                     Title:


                                 INVESTORS PARTNER LIFE INSURANCE
                                 COMPANY


                                 By: /s/ Stephen J. Blewitt
                                     ----------------------------------
                                     Name: Stephen J. Blewitt
                                     Title:


                                 MELLON BANK, N.A., solely in its capacity as
                                 Trustee for The Long Term Investment Trust,
                                 (as directed by John Hancock Mutual Life
                                 Insurance Company), and not in its
                                 individual capacity


                                 By: /s/ Carole Bruno
                                     ----------------------------------
                                     Name: Carole Bruno
                                     Title:


                                       8
<PAGE>

                                 AUSA LIFE INSURANCE COMPANY, INC.


                                 By: /s/ Gregory W. Theobald
                                     ----------------------------------
                                     Name: Gregory W. Theobald
                                     Title:


                                 LIFE INVESTORS INSURANCE COMPANY
                                 OF AMERICA


                                 By: /s/ Gregory W. Theobald
                                     ----------------------------------
                                     Name: Gregory W. Theobald
                                     Title:


                                 GREAT AMERICAN LIFE INSURANCE
                                 COMPANY


                                 By: /s/ Mark F. Muethib
                                     ----------------------------------
                                     Name: Mark F. Muethib
                                     Title:


                                 GENERAL ELECTRIC CAPITAL
                                 ASSURANCE COMPANY
                                 (f/k/a Great Northern Insured Annuity
                                 Corporation)


                                 By: /s/ Jon M. Lucia
                                     ----------------------------------
                                     Name: Jon M. Lucia
                                     Title:


                                 AMERICAN BANKERS INSURANCE COMPANY
                                 OF FLORIDA


                                 By: /s/ Robert L. Kisiel
                                     ----------------------------------
                                     Name: Robert L. Kisiel
                                     Title:


                                       9
<PAGE>

                                 COVA FINANCIAL SERVICES LIFE INSURANCE
                                 COMPANY

                                 By: CONNING ASSET MANAGEMENT
                                     COMPANY


                                 By: /s/ Laura R. Caro
                                     ----------------------------------
                                     Name: Laura R. Caro
                                     Title:


                                 HARE & CO. (with respect to Senior Note No. 12 
                                 as nominee of Lincoln National Life Insurance
                                 Company)


                                 By: /s/ Patrick M. Dodd
                                     ----------------------------------
                                     Name: Patrick M. Dodd
                                     Title:


                                       10
<PAGE>

                                 Purchasers under the June Note Agreement:

                                 JOHN HANCOCK MUTUAL LIFE
                                 INSURANCE COMPANY


                                 By: /s/ Stephen J. Blewitt
                                     ----------------------------------
                                     Name: Stephen J. Blewitt
                                     Title:


                                 JOHN HANCOCK VARIABLE LIFE
                                 INSURANCE COMPANY


                                 By: /s/ Stephen J. Blewitt
                                     ----------------------------------
                                     Name: Stephen J. Blewitt
                                     Title:


                                 GENERAL ELECTRIC CAPITAL
                                 ASSURANCE COMPANY
                                 (f/k/a Great Northern Insured Annuity
                                 Corporation)


                                 By: /s/ Jon M. Lucia
                                     ----------------------------------
                                     Name: Jon M. Lucia
                                     Title:


                                 OCCIDENTAL LIFE INSURANCE
                                 COMPANY OF NORTH CAROLINA

                                 By: CONNING ASSET MANAGEMENT
                                     COMPANY


                                 By: /s/ Laura R. Caro
                                     ----------------------------------
                                     Name: Laura R. Caro
                                     Title:


                                       11
<PAGE>

                                 PENINSULAR LIFE INSURANCE CO.

                                 By: CONNING ASSET MANAGEMENT
                                     COMPANY


                                 By: /s/ Laura R. Caro
                                     ----------------------------------
                                     Name: Laura R. Caro
                                     Title:


                                 EXECUTIVE RISK INDEMNITY INC.

                                 By: CONNING ASSET MANAGEMENT
                                     COMPANY


                                 By: /s/ Laura R. Caro
                                     ----------------------------------
                                     Name: Laura R. Caro
                                     Title:


                                       12