EXHIBIT 4(n) EXECUTION COPY AMENDMENT No. 3 entered into as of July 29, 1999 (this "AMENDMENT"), to the Credit Agreement dated as of February 12, 1998 (as amended, supplemented or otherwise modified from time to time, the "CREDIT AGREEMENT"), among Magellan Health Services, Inc., a Delaware corporation (the "PARENT BORROWER"); Charter Behavioral Health System of New Mexico, Inc., a New Mexico corporation; Merit Behavioral Care Corporation, a Delaware corporation; each other wholly owned domestic subsidiary of the Parent Borrower that becomes a "Subsidiary Borrower" pursuant to Section 2.23 of the Credit Agreement (each, a "SUBSIDIARY BORROWER" and, collectively, the "SUBSIDIARY BORROWERS" (such term is used herein as modified in Article I of the Credit Agreement); the Parent Borrower and the Subsidiary Borrowers are collectively referred to herein as the "BORROWERS"); the Lenders (as defined in Article I of the Credit Agreement); The Chase Manhattan Bank, a New York banking corporation, as administrative agent (in such capacity, the "ADMINISTRATIVE AGENT") for the Lenders, as collateral agent (in such capacity the "COLLATERAL AGENT") for the Lenders and as an issuing bank (in such capacity, an "ISSUING BANK"); First Union National Bank, a national banking corporation, as syndication agent (in such capacity, the "SYNDICATION AGENT") for the Lenders and as an issuing bank (in such capacity, an "ISSUING BANK"); and Credit Lyonnais New York Branch, a licensed branch of a bank organized and existing under the laws of the Republic of France, as documentation agent (in such capacity, the "DOCUMENTATION AGENT") for the Lenders and as an issuing bank (in such capacity, an "ISSUING BANK" and, together with The Chase Manhattan Bank and First Union National Bank, each in its capacity as an issuing bank, the "ISSUING BANKS"). A. The Lenders and the Issuing Banks have extended credit to the Borrowers, and have agreed to extend credit to the Borrowers, in each case pursuant to the terms and subject to the conditions set forth in the Credit Agreement. B. In relation to each CBHS Joint Venture (as defined in the Credit Agreement, as amended by this Amendment), the Parent Borrower and the subsidiary of the Parent Borrower that is a party to such CBHS Joint Venture (the "JV Party") have entered into a Services Agreement (as defined in the Credit Agreement, as amended by this Amendment) with CBHS or one of its subsidiaries, under which CBHS or the relevant subsidiary has agreed to provide certain services in respect of such CBHS Joint Venture. Under Section 3.1(b) of each Services Agreement with respect to a CBHS Joint Venture, the Parent Borrower and the JV Party have agreed to retain certain net proceeds from a CBHS Joint Venture Sale (as defined in the Credit Agreement, as amended by this Amendment) to be used for certain purposes specified in such Services Agreement. C. The Parent Borrower intends to effect the GPA Sale (as defined in the Credit Agreement, as amended by this Amendment) for aggregate consideration at least equal to the fair market value of the assets sold (as determined in good faith by a Responsible Officer of the Parent Borrower), in accordance with the terms of the purchase agreement in form and substance reasonably satisfactory to the Administrative Agent to be entered into to effect the GPA Sale. D. The Parent Borrower intends to effect the Specified Equity Issuances (as defined in the Credit Agreement, as amended by this Amendment), and has requested that it be able to pay dividends on the capital stock issued pursuant to the Specified Equity Issuances, and redeem, repurchase or otherwise make payments in respect of such capital stock, in certain circumstances. E. The Borrowers have requested that the requisite Lenders amend certain provisions of the Credit Agreement in connection with the transactions described in the preceding paragraphs B, C and D, and the requisite Lenders are willing so to amend such provisions of the Credit Agreement, on the terms and subject to the conditions set forth in this Amendment. F. Capitalized terms used but not defined herein have the meanings assigned to them in the Credit Agreement. Accordingly, in consideration of the mutual agreements herein contained and other good and valuable consideration, the sufficiency and receipt of which are hereby acknowledged, the parties hereto agree as follows: SECTION 1. AMENDMENTS TO SECTION 1.01. (a) The definition of the term "Change in Control" in Section 1.01 of the Credit Agreement is hereby amended by adding the word "(A)" immediately after the words "defined in" in the tenth line of such definition and by adding the following text at the end of such definition before the ".": ", or (B) the terms of any capital stock issued pursuant to any Specified Equity Issuance. Without limiting the foregoing, a Change in Control shall be deemed to have occurred if a majority of the persons holding seats on the board of directors of the Parent Borrower were nominated, appointed or elected (a) by, or at the direction of, the holders of the capital stock issued pursuant to any Specified Equity Issuance or (b) pursuant to the rights contained in the terms of any Specified Equity Issuance or in any agreement entered into in connection with, or relating to, any Specified Equity Issuance." (b) (i) The definition of the term "Permitted Stock Repurchase" in Section 1.01 of the Credit Agreement is hereby deleted in its entirety and replaced with the following new definition: ""PERMITTED STOCK REPURCHASES OR DIVIDENDS" shall mean (a) any repurchase by the Parent Borrower of shares of its common stock, (b) any repurchase by the Parent Borrower of any stock option held by any director, officer or employee, and any amount paid by the Parent Borrower in respect of the cancelation or termination of any stock option, (c) any repurchase or redemption by the Parent Borrower of shares of non-voting capital stock issued by the Parent Borrower as part of a Specified Equity Issuance, the payment of accumulated and unpaid dividends and arrearages on such shares of non-voting capital stock to the extent that such dividends and arrearages become due and payable at the time of a repurchase or redemption permitted by this clause (c), or any payment made by the Parent Borrower in connection with the sale by the holder(s) of non-voting capital stock issued by the Parent Borrower as part of a Specified Equity Issuance, in each case (i) after March 5, 2002, (ii) only in the circumstances and to the extent required by the terms and conditions of the relevant Specified Equity Issuance and (iii) solely in accordance with the terms and conditions of the relevant Specified Equity Issuance, (d) any payment of a cash dividend on any capital stock issued pursuant to any Specified Equity Issuance or (e) any payment of dividends on any capital stock issued pursuant to any Specified Equity Issuance (i) in the form of (A) additional shares of such capital stock (or of other capital stock of the Parent Borrower issued pursuant to a Specified Equity Issuance or otherwise on terms that are not less favorable to the Lenders than the terms of such capital stock) or (B) shares of common stock of the Parent Borrower (such common stock to have the same terms as the common stock issued by the Parent Borrower as of the date hereof or terms that are not less favorable to the Lenders than the terms of such common stock) and (ii) in accordance with the terms of such capital stock issued pursuant to such Specified Equity Issuance, in each case, so long as (A) after giving effect to such repurchase, redemption, cancelation, termination or payment, (1) the Parent Borrower shall be in compliance, on a PRO FORMA basis, with all covenants set forth in this Agreement, including then effective covenants contained in Sections 6.10, 6.11, 6.12, 6.13 and 6.14, which shall be recomputed as at the last day of the most recently ended fiscal quarter (for which financial information has been delivered pursuant to Section 5.04) of the Parent Borrower as if such repurchase, redemption, cancelation, termination or payment had occurred on the first day of each relevant period for testing such compliance, and (2) on the date of such repurchase, redemption, cancelation, termination or payment and immediately after giving effect thereto, no Default or Event of Default shall exist, (B) the aggregate cash amount expended by the Parent Borrower in connection with all Permitted Stock Repurchases or Dividends shall not exceed during the term of this Agreement (x) in the case of all repurchases, redemptions and payments permitted by clause (c) of this definition, the sum of (I) the lesser of $18,500,000 and the aggregate cash consideration received by the Parent Borrower in respect of the issuance of non-voting capital stock as part of a Specified Equity Issuance to Persons other than the Preemptive Rights Holders, (II) the aggregate cash consideration received by the Parent Borrower in respect of the issuance of non-voting capital stock as part of a Specified Equity Issuance to the Preemptive Rights Holders solely pursuant to the exercise of their preemptive rights under the Preemptive Rights Agreement in respect of capital stock being issued to other Persons as a Specified Equity Issuance, (III) the aggregate cash consideration received by the Parent Borrower in respect of any Equity Issuance described in the first proviso to Section 2.13(d) and (IV) $10,000,000 less the aggregate amount that has been expended pursuant to clause (a), (b), (d) or (e) above (any payment made pursuant to this clause (IV) being an "additional payment") and (y) in the case of all other Permitted Stock Repurchases or Dividends as described in clauses (a), (b), (d) or (e) above, $10,000,000 less the aggregate amount that has been expended on additional payments and (C) after giving effect to any such repurchase, redemption, cancelation, termination or payment, the aggregate amount of cash and cash equivalents on the Parent Borrower's consolidated balance sheet PLUS the remaining available balance of the Total Revolving Credit Commitment shall be at least equal to (x) in the case of Permitted Stock Repurchases or Dividends as described in clauses (a), (b), (d) or (e) above, $50,000,000 or (y) in the case of Permitted Stock Repurchases or Dividends as described in clause (c) above, $20,000,000. Notwithstanding anything to the contrary set forth in this definition, the issuance by the Parent Borrower of (a) common stock of the Parent Borrower (such common stock to have the same terms as the common stock issued by the Parent Borrower as of the date hereof or terms that are not less favorable to the Lenders than the terms of such common stock) or (b) non-redeemable participating preferred stock of the Parent Borrower (such preferred stock to be issued pursuant to the terms of a Specified Equity Issuance or on terms that are not less favorable to the Lenders than those provided in such Specified Equity Issuance), in each case in respect of accumulated and unpaid dividends and arrearages on capital stock issued pursuant to a Specified Equity Issuance when such capital stock is being converted to common stock or non-redeemable participating preferred stock of the Parent Borrower in accordance with the terms and conditions of the relevant Specified Equity Issuance, shall, to the extent that such common stock or non-redeemable participating preferred stock dividends are required under the terms and conditions of the relevant Specified Equity Issuance, constitute Permitted Stock Repurchases or Dividends." (ii) Each reference to the term "Permitted Stock Repurchase" in the Credit Agreement is hereby replaced with the term "Permitted Stock Repurchases or Dividends". (c) Section 1.01 of the Credit Agreement is hereby amended to add the defined term "GPA Sale" in the appropriate alphabetical order, to read in its entirety as follows: ""GPA SALE" shall mean the sale by the Parent Borrower and/or the relevant Subsidiaries, for aggregate consideration at least equal to the fair market value of the assets sold (as determined in good faith by a Responsible Officer of the Parent Borrower, taking into account when such consideration is payable), of (a) all the capital stock and/or all or substantially all the assets of Group Practice Affiliates, Inc., a Delaware corporation, and/or one or more of the subsidiaries of Group Practice Affiliates, Inc. and (b) any and all ancillary, similar or related assets to the businesses being so sold, all in accordance with the terms of a purchase agreement or agreements (in related transactions) in form and substance reasonably satisfactory to the Administrative Agent, PROVIDED that such GPA Sale shall be deemed to be an Asset Sale with Net Cash Proceeds in an amount equal to the greater of (a) $15,000,000 or (b) the Net Cash Proceeds received by the Parent Borrower and/or such relevant Subsidiaries in connection with such GPA Sale." (d) Section 1.01 of the Credit Agreement is hereby amended to add the defined term "CBHS Joint Ventures" in the appropriate alphabetical order, to read in its entirety as follows: ""CBHS JOINT VENTURES" shall mean the partnerships and limited liability companies constituted under the agreements referred to in the following clauses (a) through (f), in each case as the same may be amended, supplemented and restated from time to time: (a) the Amended and Restated Limited Partnership Agreement dated as of May 31, 1995, under which Charter Behavioral Health System of New Mexico, Inc. and New Mexico Psychiatric Company formed Charter Heights Behavioral Health System Limited Partnership, (b) the Operating Agreement dated as of September 30, 1995, under which Charter Behavioral Health System of Lafayette, Inc. and Louisiana Psychiatric Company, Inc. formed The Charter Cypress Behavioral Health System, L.L.C., (c) the Operating Agreement dated as of June 30, 1995, under which Charter Northridge Behavioral Health System, Inc. and Wake Psychiatric Hospital, Inc. formed Holly Hill/Charter Behavioral Health System, L.L.C., (d) the Operating Agreement dated as of August 6, 1996, under which Charter Behavioral Health Systems, Inc. (now Magellan CBHS Holdings, Inc.) and Columbia North Alaska Healthcare, Inc. formed Charter North Star Behavioral Health System, L.L.C., (e) the Joint Venture Agreement dated as of November 1, 1988, under which Naperville Health Ventures (assignor of Edward Hospital Ventures) and P.I.A. Naperville, Inc. (assignor of Charter Linden Oaks Behavioral Health System, Inc.) formed Naperville Psychiatric Ventures and (f) the Agreement of Limited Partnership dated as of February 28, 1995, under which Charter Behavioral Health System of Massachusetts, Inc., Westwood/Pembroke Corporation and Psychiatric Associates of Norfolk County, Inc. formed Westwood/Pembroke Health System Limited Partnership." (e) Section 1.01 of the Credit Agreement is hereby amended to add the defined term "CBHS Joint Venture Sale" in the appropriate alphabetical order, to read in its entirety as follows: ""CBHS JOINT VENTURE SALE" shall mean, in respect of any CBHS Joint Venture, the sale by the Parent Borrower or the Subsidiary that holds an interest in such CBHS Joint Venture, or owns a hospital property that is solely used by such CBHS Joint Venture (the "hospital"), of (a) all of its interest in such CBHS Joint Venture, (b) the hospital solely used by such CBHS Joint Venture or (c) in the case of a Subsidiary the only material asset of which is an ownership interest in such CBHS Joint Venture or the hospital, all the capital stock of that Subsidiary, for aggregate cash consideration at least equal to the fair market value of the assets sold (as determined in good faith by a Responsible Officer of the Parent Borrower, taking into account when such consideration is payable)." (f) Section 1.01 of the Credit Agreement is hereby amended to add the defined term "Preemptive Rights Agreement" in the appropriate alphabetical order, to read in its entirety as follows: ""Preemptive Rights Agreement" shall mean that certain Stock and Warrant Purchase Agreement dated as of December 22, 1995, between the Parent Borrower (formerly Charter Medical Corporation) and Richard E. Rainwater, as assigned and amended." (g) Section 1.01 of the Credit Agreement is hereby amended to add the defined term "Preemptive Rights Holders" in the appropriate alphabetical order, to read in its entirety as follows: ""Preemptive Rights Holders" shall mean, collectively, the holders of the preemptive rights to buy capital stock of the Parent Borrower pursuant to the Preemptive Rights Agreement." (h) Section 1.01 of the Credit Agreement is hereby amended to add the defined term "Services Agreement" in the appropriate alphabetical order, to read in its entirety as follows: ""SERVICES AGREEMENT" shall mean, in respect of each CBHS Joint Venture, the services agreement dated as of June 16, 1997, entered into among the Parent Borrower, the Subsidiary that holds an interest in such CBHS Joint Venture and CBHS or one of its subsidiaries." (i) Section 1.01 of the Credit Agreement is hereby amended to add the defined term "Specified Equity Issuance" in the appropriate alphabetical order, to read in its entirety as follows: ""SPECIFIED EQUITY ISSUANCE" shall mean (a) any Equity Issuance by the Parent Borrower of capital stock on or before March 31, 2000, PROVIDED that (i) the Parent Borrower designates in writing to the Administrative Agent at the time of such Equity Issuance that such Equity Issuance is a "Specified Equity Issuance" for the purposes of this Agreement, (ii) the material terms of such Equity Issuance have been approved by the Required Lenders and (iii) the aggregate stated value or liquidation preference of all such capital stock so issued pursuant to this clause (a) shall not exceed the sum of (i) $76,000,000 and (ii) the aggregate cash consideration received by the Parent Borrower from the issuance of capital stock of the Parent Borrower to the Preemptive Rights Holders solely pursuant to the exercise of their preemptive rights under the Preemptive Rights Agreement in respect of capital stock being issued to other Persons as a Specified Equity Issuance, and (b) any payment of dividends by the Parent Borrower referred to in clause (e) of the definition of the term "Permitted Stock Repurchases or Dividends." SECTION 2. AMENDMENT TO SECTION 2.13(a). The Lenders hereby amend Section 2.13(a) of the Credit Agreement by adding the text "(i)" after the text "shall be required" in the fifth line of that Section and by adding the following text at the end of that Section: "or (ii) in respect of any CBHS Joint Venture Sale to the extent, but only to the extent, that the Parent Borrower or any Subsidiary is required to make available for reinvestment for the benefit of CBHS or any of its subsidiaries an amount equal to all or a portion of the Net Cash Proceeds received from such CBHS Joint Venture Sale (A) in respect of all of the CBHS Joint Ventures, pursuant to Section 3.1(b) of the Services Agreement relating to such CBHS Joint Venture or (B) in respect of the CBHS Joint Ventures described in clauses (a) and (d) of the definition of the term "CBHS Joint Venture", as may be required or necessary (as reasonably determined by the Parent Borrower and to the reasonable satisfaction of the Administrative Agent) in order for the Parent Borrower or any Subsidiary to satisfy or obtain a release of its obligations pursuant to Section 6.11(b) of the Services Agreement or the organizational documents of the CBHS Joint Venture (as in effect on July 19, 1999) as a result of such CBHS Joint Venture Sale." SECTION 3. AMENDMENT TO SECTION 2.13(d). The Lenders hereby amend Section 2.13(d) of the Credit Agreement by deleting the existing text of Section 2.13(d) in its entirety and replacing it with the following new text: (d) In the event that any Borrower or any Guarantor shall receive Net Cash Proceeds from an Equity Issuance, the Borrowers shall, substantially simultaneously with (and in any event not later than the third Business Day next following) the receipt of such Net Cash Proceeds, prepay outstanding Loans in accordance with Section 2.13(e) by an amount equal to (i) 50% of such Net Cash Proceeds if such Equity Issuance was a Specified Equity Issuance of non-voting capital stock that has been approved by the shareholders of the Parent Borrower, (ii) 100% of such Net Cash Proceeds if such Equity Issuance was a Specified Equity Issuance of non-voting capital stock that has not been approved by the shareholders of the Parent Borrower, (iii) 50% of such Net Cash Proceeds if such Equity Issuance was a Specified Equity Issuance other than a Specified Equity Issuance described in paragraphs (i) and (ii) of this Section 2.13(d), and (iv) 75% of the Net Cash Proceeds from any other Equity Issuance; PROVIDED, HOWEVER, that no such prepayment shall be required in connection with any Equity Issuance in respect of which the Parent Borrower advises the Administrative Agent prior to date of that Equity Issuance that the Net Cash Proceeds of such Equity Issuance are intended to be used, and are used, by the Parent Borrower solely for the purpose of effecting a repurchase or redemption, or making a payment, permitted by clause (c) or (d) (but, in the case of clause (d), only with respect to dividends on non-voting capital stock issued pursuant to a Specified Equity Issuance) of the definition of the term "Permitted Stock Repurchases or Dividends", and PROVIDED FURTHER, that no such prepayment shall be required until the September 30 that is immediately after such issuance if the applicable Net Cash Proceeds plus all other Net Cash Proceeds that have yet to be applied in accordance with this Section 2.13(d) are less than $5,000,000. SECTION 4. AMENDMENT TO SECTION 6.05. The Lenders hereby amend Section 6.05 of the Credit Agreement by adding the text "(other than the GPA Sale and each CBHS Joint Venture Sale)" after the text "Asset Sale" in the third line of that Section. SECTION 5. AMENDMENT TO SECTION 6.08(a). The Lenders hereby amend Section 6.08(a) of the Credit Agreement by adding the following proviso to the end of that Section: ", PROVIDED, HOWEVER, that any amendment of the charter or bylaws of the Parent Borrower reasonably determined by the Parent Borrower, and accepted by the Administrative Agent in its reasonable judgment, to be necessary to give effect to the terms of the Specified Equity Issuances shall not be prohibited by this Section 6.08." SECTION 6. REPRESENTATIONS AND WARRANTIES. Each Borrower represents and warrants to the Administrative Agent and to each of the Lenders that: (a) This Amendment has been duly authorized, executed and delivered by it and constitutes a legal, valid and binding obligation of each Loan Party party hereto, enforceable against such Loan Party in accordance with its terms. (b) After giving effect to this Amendment, the representations and warranties set forth in Article III of the Credit Agreement are true and correct in all material respects on and as of the date hereof with the same effect as if made on and as of the date hereof, except to the extent such representations and warranties expressly relate to an earlier date. (c) On the date hereof and immediately after giving effect to this Amendment, no Event of Default or Default has occurred and is continuing. SECTION 7. AMENDMENT FEE. In consideration of the agreements of the Lenders contained in this Amendment, the Parent Borrower agrees to pay to the Administrative Agent, for the account of each Lender that delivers an executed counterpart of this Amendment prior to 5:00 p.m., New York City time, on July 29, 1999, an amendment fee (the "AMENDMENT FEE") in an amount equal to 0.10% of the sum of such Lender's outstanding Term Loans and Revolving Credit Commitment as of such date. SECTION 8. CONDITIONS TO EFFECTIVENESS. This Amendment shall become effective as of the date first above written when (a) the Administrative Agent shall have received (i) counterparts of this Amendment that, when taken together, bear the signatures of the Borrowers and the Lenders required by the Credit Agreement and (ii) the Amendment Fees and (b) all fees and expenses required to be paid or reimbursed by the Borrowers pursuant hereto or to the Credit Agreement shall have been paid or reimbursed, as applicable. SECTION 9. CREDIT AGREEMENT. Except as specifically amended hereby, the Credit Agreement shall continue in full force and effect in accordance with the provisions thereof as in existence on the date hereof. After the date hereof, any reference to the Credit Agreement shall mean the Credit Agreement as amended hereby. This Amendment shall be a Loan Document for all purposes. SECTION 10. APPLICABLE LAW. THIS AMENDMENT SHALL BE GOVERNED BY, AND CONSTRUED IN ACCORDANCE WITH, THE LAWS OF THE STATE OF NEW YORK. SECTION 11. COUNTERPARTS. This Amendment may be executed in two or more counterparts, each of which shall constitute an original but all of which when taken together shall constitute but one agreement. Delivery of an executed signature page to this Amendment by facsimile transmission shall be effective as delivery of a manually signed counterpart of this Amendment. SECTION 12. EXPENSES. The Parent Borrower agrees to reimburse the Administrative Agent for its out-of-pocket expenses in connection with this Amendment, including the reasonable fees, charges and disbursements of Cravath, Swaine & Moore, counsel for the Administrative Agent. SECTION 13. APPROVAL OF TERMS OF SPECIFIED EQUITY ISSUANCE. By its execution hereof, each Lender shall have given its approval to the Specified Equity Issuances described in the letter from the Parent Borrower to the Administrative Agent dated July 19, 1999. IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be duly executed by their respective authorized officers as of the day and year first written above. MAGELLAN HEALTH SERVICES, INC., by Name: Title: CHARTER BEHAVIORAL HEALTH SYSTEM OF NEW MEXICO, INC., by Name: Title: MERIT BEHAVIORAL CARE CORPORATION, by Name: Title: THE CHASE MANHATTAN BANK, individually and as Administrative Agent, Collateral Agent and an Issuing Bank, by Name: Title: FIRST UNION NATIONAL BANK, individually and as Syndication Agent and an Issuing Bank, by Name: Title: CREDIT LYONNAIS NEW YORK BRANCH, individually and as Documentation Agent and an Issuing Bank, by Name: Title: To Approve the Amendment: by Name: Title: