EXHIBIT 10.40


                      AMENDMENT NO. 12 TO CREDIT AGREEMENT


                  THIS AMENDMENT NO. 12 TO CREDIT  AGREEMENT  (the  "Amendment")
dated as of October 3, 1996 by and among Mariner Health Group,  Inc., a Delaware
corporation (the "Borrower"), The Chase Manhattan Bank (as successor to Chemical
Bank),  CoreStates  Bank, N.A.,  Creditanstalt-Bankverein,  First Union National
Bank of North Carolina,  Mellon Bank, N.A., NationsBank of Tennessee,  N.A., PNC
Bank, National Association and Toronto Dominion (New York), Inc.  (collectively,
the "Banks"),  and PNC Bank, National Association,  in its capacity as agent for
the Banks (the "Agent").

                              W I T N E S S E T H:

                  WHEREAS, the parties hereto are parties to that certain Credit
Agreement  dated  as of May 18,  1994,  as  amended  (the  "Credit  Agreement"),
pursuant to which the Banks provided a $250,000,000 revolving credit facility to
the Borrower; and

                  WHEREAS, the Borrower, the Banks and the Agent desire to amend
and restate the Credit Agreement as hereinafter provided.

                  NOW, THEREFORE,  the parties hereto, in consideration of their
mutual  covenants  and  agreements  hereinafter  set forth and  intending  to be
legally bound hereby, covenant and agree as follows:

         1.        Definitions.

                   (a) Defined terms used herein unless otherwise defined herein
shall have the meanings  ascribed to them in the Credit  Agreement as amended by
this Amendment.

         2.        Amendment of Credit Agreement.

                   (a) Articles I through XI. The parties hereto do hereby amend
and restate the recitals  and  Articles I through XI to the Credit  Agreement as
set forth on Exhibit 1 hereto.

                   (b) Schedules.  Each of the following schedules to the Credit
Agreement  is hereby  amended and  restated to read as set forth on the schedule
attached hereto bearing the same numerical reference as the original schedule

      Schedule 6.01(a) and (c)           Qualifications    to    do    Business,
                                         Subsidiaries and Excluded Entities

      Schedule 6.01(u)                   Material Contracts





      Schedule 6.01(y)                   Environmental Disclosures

      Schedule 8.02(c)                   Certain Guaranties

      Schedule 6.01(cc)                  Allegis Facilities  Indebtedness;  Lien
                                         Releases;   Intercreditor   Agreements;
                                         Non-Disturbance Agreements; Consents to
                                         Leasehold Mortgages and Second Liens

                   (c) Exhibits.  Each of the  following  exhibits to the Credit
Agreement  is hereby  amended  and  restated to read as set forth on the exhibit
attached hereto bearing the same numerical reference as the original exhibit:

      Exhibit 2.05                       Revolving Credit Loan Request
      Exhibit 8.01(m)(i)                 Acquisition Approval Certificate
      Exhibit 8.01(m)(ii)                Acquisition Notice Certificate


                           The   following   exhibit  is  hereby   added  as  an
additional, new exhibit to the Credit Agreement:

      Exhibit 8.03(d)(3)                 Compliance Certificate for Quarter
                                         Ending 9/30/96 and Thereafter

         3. Conditions of Effectiveness of This Agreement.  The effectiveness of
this  Amendment  is  expressly  conditioned  upon  satisfaction  of  each of the
following conditions precedent:

                   (a)   Representations  and  Warranties;   No  Defaults.   The
representations  and  warranties of the Borrower  contained in Article VI of the
Credit  Agreement  shall be true and  accurate  on the date hereof with the same
effect as though such  representations and warranties had been made on and as of
such date (except  representations  and  warranties  which  relate  solely to an
earlier date or time,  which  representations  and warranties  shall be true and
correct on and as of the specific dates or times  referred to therein),  and the
Borrower  shall have  performed and complied  with all covenants and  conditions
hereof;  no Event of Default or  Potential  Default  under the Credit  Agreement
shall have occurred and be continuing or shall exist.

                   (b) Organization,  Authorization and Incumbency.  There shall
be delivered to the Agent for the benefit of each Bank a certificate dated as of
the date hereof and signed by the  Secretary or an  Assistant  Secretary of each
Loan Party, certifying as appropriate as to:

                       (i) all  action  taken by such Loan  Party in  connection
with this Amendment and the other Loan Documents;

                       (ii) the names of the officer or officers  authorized  to
sign this Amendment and the other documents executed and delivered in connection
herewith and


                                      -2-


described in this Section 3 and the true  signatures of such officer or officers
and, in the case of the Borrower,  specifying the Authorized  Officers permitted
to act on behalf of the Borrower for purposes of the Loan Documents and the true
signatures of such officers,  on which the Agent and each Bank may  conclusively
rely; and

                       (iii) copies of its organizational  documents,  including
its  certificate  of  incorporation  and bylaws if it is a  corporation  and its
certificate of partnership and partnership agreement if it is a partnership,  in
each case as in effect on the date hereof,  certified by the  appropriate  state
official  where  such  documents  are  filed  in a state  office  together  with
certificates from the appropriate state officials as to the continued  existence
and good  standing of each of the Loan  Parties in each state  where  organized;
provided  that each of the Loan  Parties  other than  Borrower  may,  in lieu of
delivering  copies of the foregoing  organizational  documents  (excluding  good
standing  certificates),  certify  that the  organizational  documents  which it
previously delivered remain in effect and have not been amended.

                   (c)  Opinions of Counsel.  There  shall be  delivered  to the
Agent for the  benefit of each Bank a written  opinion  dated the date hereof of
Testa, Hurwitz & Thibeault,  counsel for the Loan Parties, in form and substance
satisfactory to the Agent.

                   (d) Fees and Expenses.  The Borrower shall pay or cause to be
paid to the Agent for itself and for the  account of the Banks to the extent not
previously  paid the fees set  forth on  Exhibit 2  hereto,  and all other  fees
accrued  through the date hereof and the costs and expenses of the Agent and the
Banks including,  without limitation,  fees of the Agent's counsel in connection
with this Amendment.

                   (e) Acknowledgment.  Each of the Loan Parties, other than the
Borrower,  shall have executed the Confirmation of Guaranty in the form attached
hereto as Exhibit 3 hereto.

                   (f)  Legal  Details;  Counterparts.  All  legal  details  and
proceedings in connection with the  transactions  contemplated by this Amendment
shall be in form and substance  satisfactory  to the Agent,  and the Agent shall
have received all such other counterpart  originals or certified or other copies
of such documents and proceedings in connection with such transactions,  in form
and substance satisfactory to the Agent.

         4. Completion of Outstanding  Items. On or before December 1, 1996, the
Borrower shall have completed the outstanding conditions to the effectiveness of
Amendment  Nos. 1 through 12 to the Credit  Agreement and delivered to the Agent
for the benefit of the Banks evidence of the same  satisfactory to the Agent, in
its sole  discretion,  it  being  expressly  agreed  that  satisfaction  of such
outstanding conditions has not been waived by the Banks.

         5.        Amendment to Certain Other Loan Documents.

                   (a) Schedule 1 to that  certain  Guaranty  Agreement  made by
each  Subsidiary of the Borrower  party  thereto,  for the benefit of the Banks,
dated as of May 18, 1994, as amended,  is hereby amended and restated to read as
set forth on the Schedule  attached hereto bearing the same numerical  reference
and name.



                                      -3-


                   (b) Schedule A to the  following  Pledge  Agreement is hereby
amended  and  restated  to read as set  forth on the  schedule  attached  hereto
bearing the same name:

                       (i) SCHEDULE A TO THE PLEDGE  AGREEMENT  (Borrower) dated
as of May 18,  1994,  as amended,  by the  Borrower,  as pledgor in favor of the
Agent

         6. Force and Effect.  Except as expressly  modified by this  Amendment,
the Credit  Agreement  and the other Loan  Documents  are  hereby  ratified  and
confirmed and shall remain in full force and effect after the date hereof.

         7. Governing Law. This Amendment shall be deemed to be a contract under
the laws of the  Commonwealth  of  Pennsylvania  and for all  purposes  shall be
governed by and construed  and enforced in accordance  with the internal laws of
the  Commonwealth  of  Pennsylvania  without  regard  to its  conflict  of  laws
principles.

                              [INTENTIONALLY BLANK]


                                      -4-


                   [SIGNATURE PAGE 1 OF 2 TO AMENDMENT NO. 12]

         IN WITNESS WHEREOF,  the parties hereto have executed this Amendment as
of the date first above written.

                                    MARINER HEALTH GROUP, INC.


                                    By:     /s/ Arthur W. Stratton, Sr.
                                        ----------------------------------
                                    Name:
                                          --------------------------------
                                    Title:
                                          --------------------------------

                                    PNC BANK, NATIONAL ASSOCIATION,
                                    individually and as Agent


                                    By:     /s/ Scott D. Colcombe
                                        ----------------------------------
                                    Name:
                                          --------------------------------
                                    Title:
                                          --------------------------------

                                    THE CHASE MANHATTAN BANK (as successor
                                    to Chemical Bank)


                                    By:     /s/ Dawn Lee Lum
                                        ----------------------------------
                                    Name:
                                          --------------------------------
                                    Title:
                                          --------------------------------

                                    CORESTATES BANK, N.A.


                                    By:     /s/ Geoffrey C. Smith
                                        ----------------------------------
                                    Name:
                                          --------------------------------
                                    Title:
                                          --------------------------------

                                    CREDITANSTALT - BANKVEREIN


                                    By:     /s/ Gregory F. Mathis
                                        ----------------------------------
                                    Name:
                                          --------------------------------
                                    Title:
                                          --------------------------------

                                    By:     /s/ Fiona McKone
                                        ----------------------------------
                                    Name:
                                          --------------------------------
                                    Title:
                                          --------------------------------


                                      -5-



                   [SIGNATURE PAGE 2 OF 2 TO AMENDMENT NO. 12]

                                    FIRST UNION NATIONAL BANK OF
                                    NORTH CAROLINA


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

                                    MELLON BANK, N.A.


                                    By:     /s/ Carol Paige
                                        ----------------------------------
                                    Name:
                                          --------------------------------
                                    Title:
                                          --------------------------------

                                    NATIONSBANK OF TENNESSEE, N.A.


                                    By:     /s/ Michael Sylvester
                                        ----------------------------------
                                    Name:
                                          --------------------------------
                                    Title:
                                          --------------------------------

                                    TORONTO DOMINION (NEW YORK), INC.


                                    By:     /s/ Jorge Garcia
                                        ----------------------------------
                                    Name:
                                          --------------------------------
                                    Title:
                                          --------------------------------



                                      -6-