Document:

<PAGE>

                                                                    EXHIBIT 10.4

                                THIRD AMENDMENT

      THIS THIRD AMENDMENT (this "Amendment") dated as of June 24, 2004 to the
Credit Agreement referenced below is by and among PSYCHIATRIC SOLUTIONS, INC, a
Delaware corporation (the "Borrower"), the Guarantors identified on the
signature pages hereto, the Lenders identified on the signature pages hereto and
BANK OF AMERICA, N.A., as Administrative Agent.

                                   WITNESSETH

      WHEREAS, a revolving credit facility of up to $125 million has been
extended to the Borrower pursuant to the terms of that Credit Agreement (as
amended, modified and supplemented from time to time, the "Credit Agreement")
dated as of January 6, 2004 among the Borrower, the Guarantors identified
therein, the Lenders identified therein and the Administrative Agent; and

      WHEREAS, the Borrower has requested that the Lenders agree to certain
modifications of the Credit Agreement and the Lenders have agreed to the
requested modifications on the terms and conditions set forth herein.

      NOW, THEREFORE, IN CONSIDERATION of the premises and other good and
valuable consideration, the receipt and sufficiency of which are hereby
acknowledged, the parties hereto agree as follows:

      1. Defined Terms. Capitalized terms used herein but not otherwise defined
herein shall have the meanings provided to such terms in the Credit Agreement.

      2. Amendment. Section 8.11(a) of the Credit Agreement is amended to read
as follows:

            (a) Consolidated Total Leverage Ratio. Permit the Consolidated Total
            Leverage Ratio as of the end of any fiscal quarter of the Borrower
            to be greater than (i) for each fiscal quarter ending prior to June
            30, 2005, 4.50:1.0, (ii) for the fiscal quarter ending June 30, 2005
            and each fiscal quarter ending thereafter, 4.00:1.0.

      3. Conditions Precedent. This Amendment shall become effective as of the
date hereof upon receipt by the Administrative Agent of counterparts of this
Amendment executed by the Borrower, the Guarantors and the Lenders.

      4. Reaffirmation of Representations and Warranties. The Borrower
represents and warrants that the representations and warranties set forth in the
Loan Documents are true and correct as of the date hereof (except those that
expressly relate to an earlier period).

      5. Reaffirmation of Guaranty. Each Guarantor (i) acknowledges and consents
to all of the terms and conditions of this Amendment, (ii) affirms all of its
obligations under the Loan Documents and (iii) agrees that this Amendment and
all documents executed in connection herewith do not operate to reduce or
discharge such Guarantor's obligations under the Credit Agreement or the other
Loan Documents.

      6. Reaffirmation of Security Interests. The Borrower and each Guarantor
(i) affirms that each of the Liens granted in or pursuant to the Loan Documents
are valid and subsisting and (ii) agrees that this Amendment shall in no manner
impair or otherwise adversely effect any of the Liens granted in or pursuant to
the Loan Documents.

      7. No Other Changes. Except as modified hereby, all of the terms and
provisions of the Loan Documents shall remain in full force and effect.

<PAGE>

      8. Counterparts. This Amendment may be executed in any number of
counterparts, each of which when so executed and delivered shall be deemed an
original and it shall not be necessary in making proof of this Amendment to
produce or account for more than one such counterpart.

      9. Governing Law. This Amendment shall be deemed to be a contract made
under, and for all purposes shall be construed in accordance with, the laws of
the State of New York.

                            [Signature Pages Follow]

                                       2
<PAGE>

      IN WITNESS WHEREOF, each of the parties hereto has caused a counterpart of
this Amendment to be duly executed and delivered as of the date first above
written.

BORROWER:

PSYCHIATRIC SOLUTIONS, INC., a Delaware corporation

By: /s/ Brent Turner
    ----------------
Name:
Title:

GUARANTORS:

AERIES HEALTHCARE CORPORATION, a Delaware corporation
AERIES HEALTHCARE OF ILLINOIS, INC., an Illinois corporation
BOUNTIFUL PSYCHIATRIC HOSPITAL, INC., a Utah corporation
COLLABORATIVE CARE CORPORATION, a Tennessee corporation
EAST CAROLINA PSYCHIATRIC SERVICES CORPORATION, a North Carolina corporation
GREAT PLAINS HOSPITAL, INC., a Missouri corporation
GULF COAST TREATMENT CENTER, INC., a Florida corporation
H.C. CORPORATION, an Alabama corporation
HAVENWYCK HOSPITAL INC., a Michigan corporation
HSA HILL CREST CORPORATION, an Alabama corporation
HSA OF OKLAHOMA, INC., an Oklahoma corporation
INFOSCRIBER CORPORATION, a Delaware corporation
LAURELWOOD CENTER, INC., a Mississippi corporation
MICHIGAN PSYCHIATRIC SERVICES, INC., a Michigan corporation
PREMIER BEHAVIORAL SOLUTIONS, INC., a Delaware corporation
PREMIER BEHAVIORAL SOLUTIONS OF ALABAMA, INC., a Delaware corporation
PSI CEDAR SPRINGS HOSPITAL, INC., a Delaware corporation
PSI COMMUNITY MENTAL HEALTH AGENCY MANAGEMENT, INC., a Tennessee corporation
PSI-EAP, INC., a Delaware corporation
PSI HOSPITALS, INC., a Delaware corporation
PSYCHIATRIC MANAGEMENT RESOURCES, INC., a California corporation
PSYCHIATRIC PRACTICE MANAGEMENT OF ARKANSAS, INC., a Tennessee corporation
PSYCHIATRIC SOLUTIONS HOSPITALS, INC., a Delaware corporation
PSYCHIATRIC SOLUTIONS OF ALABAMA, INC. a Tennessee corporation
PSYCHIATRIC SOLUTIONS OF ARIZONA, INC., a Delaware corporation
PSYCHIATRIC SOLUTIONS OF FLORIDA, INC., a Tennessee corporation
PSYCHIATRIC SOLUTIONS OF LOUISIANA, INC., a Delaware corporation
PSYCHIATRIC SOLUTIONS OF NORTH CAROLINA, INC., a Tennessee corporation
PSYCHIATRIC SOLUTIONS OF OKLAHOMA, INC., a Delaware corporation
PSYCHIATRIC SOLUTIONS OF TENNESSEE, INC., a Tennessee corporation
RAMSAY MANAGED CARE, INC., a Delaware corporation

By: /s/ Brent Turner
    ----------------
Name:
Title:

                           [SIGNATURE PAGES CONTINUE]

<PAGE>

RAMSAY TREATMENT SERVICES, INC., a Delaware corporation
RAMSAY YOUTH SERVICES OF FLORIDA, INC., a Delaware corporation
RAMSAY YOUTH SERVICES OF GEORGIA, INC., a Delaware corporation
RAMSAY YOUTH SERVICES OF SOUTH CAROLINA, INC., a Delaware corporation
RHCI SAN ANTONIO, INC., a Delaware corporation
SOLUTIONS CENTER OF LITTLE ROCK, INC., a Tennessee corporation
SUNSTONE BEHAVIORAL HEALTH, INC., a Tennessee corporation
THE COUNSELING CENTER OF MIDDLE TENNESSEE, INC., a Tennessee corporation
TRANSITIONAL CARE VENTURES, INC., a Delaware corporation
TRANSITIONAL CARE VENTURES (TEXAS), INC., a Delaware corporation
PSI TEXAS HOSPITALS, LLC, a Texas limited liability company
THERAPEUTIC SCHOOL SERVICES, LLC, an Oklahoma limited liability company

By: /s/ Brent Turner
    ----------------
Name:
Title:

NEURO INSTITUTE OF AUSTIN, L.P., a Texas limited partnership
TEXAS CYPRESS CREEK HOSPITAL, L.P., a Texas limited partnership
TEXAS LAUREL RIDGE HOSPITAL, L.P., a Texas limited partnership
TEXAS OAKS PSYCHIATRIC HOSPITAL, L.P., a Texas limited partnership
TEXAS SAN MARCOS TREATMENT CENTER, L.P., a Texas limited partnership
TEXAS WEST OAKS HOSPITAL, L.P., a Texas limited partnership

By: PSI TEXAS HOSPITALS, LLC, its general partner

    By: /s/ Brent Turner
        ----------------
    Name:
    Title:

H.C. PARTNERSHIP, an Alabama general partnership

By: H.C. CORPORATION, its general partner
    HSA HILL CREST CORPORATION, its general partner

    By: /s/ Brent Turner
        ----------------
    Name:
    Title:

                           [SIGNATURE PAGES CONTINUE]

<PAGE>

ADMINISTRATIVE AGENT:       BANK OF AMERICA, N.A.,
                            as Administrative Agent

                            By: /s/ Michael Brashler
                                -----------------------
                            Name: Michael Brashler
                            Title: Vice President

LENDERS:                    BANK OF AMERICA, N.A.,
                            as a Lender, L/C Issuer and Swing Line Lender

                            By: /s/ Elizabeth L. Knox
                                -----------------------
                            Name: Elizabeth L. Knox
                            Title: SVP

                            LEHMAN COMMERCIAL PAPER, INC.

                            By: /s/ Francis Chang
                                -----------------------
                            Name: Francis Chang
                            Title: Authorized Signatory

                            GENERAL ELECTRIC CAPITAL CORPORATION

                            By: /s/ Steve J. Warner
                                -----------------------
                            Name: Steve J. Warner
                            Title: Duly Authorized Signatory

                            AMSOUTH BANK

                            By: /s/ William H. Berrell
                                -----------------------
                            Name: William H. Berrell
                            Title: Vice President

                           SUNTRUST BANK

                            By:
                                -----------------------
                            Name:
                            Title:

                            FIFTH THIRD BANK, N.A. (Tennessee)

                            By: /s/ Sandy Hamrick
                                -----------------------
                            Name: Sandy Hamrick
                            Title:

                            UNION PLANTERS BANK, N.A.

                            By: /s/ Craig Gardella
                                -----------------------
                            Name: Craig Gardella
                            Title: Senior Vice-President

                           [SIGNATURE PAGES CONTINUE]

<PAGE>

                            FIRST TENNESSEE BANK NATIONAL ASSOCIATION

                            By: /s/ L. A. Galyon IV
                                ----------------------
                            Name: L. A. Galyon IV
                            Title: Vice President

                            US BANK NATIONAL ASSOCIATION

                            By:
                                ----------------------
                            Name:
                            Title:

                            BANK ONE, N.A.

                            By: /s/ Timothy K. Boyle
                                ----------------------
                            Name: Timothy K. Boyle
                            Title: First Vice President

                            LASALLE BANK NATIONAL ASSOCIATION

                            By: /s/ Sarah Rusher
                                ----------------------
                            Name: Sarah Rusher
                            Title: First Vice President[BANK OF AMERICA LOGO]

<Table>
<Caption>

<S>                               <C>
To:                               Psychiatric Solutions
                                  113 Seaboard Lane, Ste C 100
                                  Franklin, TN 37067
Attn:                             Brent Turner
Telephone:                        615-312-5709
Fax:                              615-312-5710

From:                             Bank of America, N.A.
                                  233 South Wacker Drive - Suite 2800
                                  Chicago
                                  Illinois 60606
                                  U.S.A.
Department:                       Swaps Operations
Telephone:                        (+1) 312 234 2732
Fax:                              (+1) 312 234 3603

Date:                             26th April 2004

Our Reference No:                 3224402 / 3224403
Reference Name:                   Todd Craig
Internal Tracking No:             7649771
</Table>

Dear Sir/Madam,

The purpose of this letter agreement is to confirm the terms and conditions of
the Transaction entered into between Psychiatric Solutions and Bank of America,
N.A. (each a "party" and together "the parties") on the Trade Date specified
below (the "Transaction"). This letter agreement constitutes a "Confirmation" as
referred to in the ISDA Master Agreement specified below (the "Agreement").

The definitions and provisions contained in the 2000 ISDA Definitions, as
published by the International Swaps and Derivatives Association, Inc., (the
"Definitions") are incorporated into this Confirmation. In the event of any
inconsistency between the Definitions and this Confirmation, this Confirmation
will govern.

This Confirmation supplements, forms part of, and is subject to, the ISDA Master
Agreement dated as of 2nd January 2004, as amended and supplemented from time to
time, between the parties. All provisions contained in the Agreement govern this
Confirmation except as expressly modified below.

In this Confirmation "Party A" means Bank of America, N.A. and "Party B" means
Psychiatric Solutions.
<PAGE>
GENERAL TERMS:

The terms of the particular Transaction to which this Confirmation relates are
as follows:

<Table>
         <S>                                 <C>
         Notional Amount:                    USD 30,000,000.00

         Trade Date:                         23rd April 2004

         Effective Date:                     23rd April 2004

         Termination Date:                   15th June 2013, subject to "Other Provisions"

         FIXED AMOUNTS:

                  Fixed Rate Payer:          Party A

                  Fixed Rate Payer
                  Payment Date:              The 15th of each June and December, commencing on 15th
                                             June 2004 and ending on the Termination Date, subject to
                                             adjustment in accordance with the Modified Following
                                             Business Day Convention Subject to "Other Provisions"
                                             contained herein.

                  Fixed Rate Payer
                  Period End Dates:          The 15th of each June and December, commencing on 15th
                                             June 2004 and ending on the Termination Date. No
                                             adjustment.

                  Fixed Rate:                10.62500 per cent

                  Fixed Rate Day
                  Count Fraction:            30/360

                  Business Days for
                  Payments:                  New York and London

                  Business Days for Period
                  End Dates:                 New York

         FLOATING AMOUNTS:

                  Floating Rate Payer:       Party B

                  Floating Rate Payer
                  Payment Date:              The 15th of each June and December, commencing on 15th
                                             June 2004 and ending on the Termination Date, subject to
                                             adjustment in accordance with the Modified Following
                                             Business Day Convention Subject to "Other Provisions"
                                             contained herein.

                  Final Calculation Period:  For the purposes of Section 4.13. of the Definitions, the
                                             Termination Date shall be subject to adjustment in accordance
                                             with the Modified Following Business Day Convention

                  Floating Rate for initial
</Table>

                                                                              2
<PAGE>
<TABLE>
<S>                                 <C>
Calculation Period:                 to be determined

Floating Rate Option:               USD-LIBOR-BBA

Designated Maturity:                6 Month

Spread:                             plus 5.51000 per cent

Floating Rate Day
Count Fraction                      Actual/360

Reset Dates:                        Last day of each Calculation Period

Business Days for Payments:         New York and London

Business Days for Period
End Dates:                          New York

CALCULATION AGENT:                  Party A

OTHER PROVISIONS:

Additional Optional Termination:
</TABLE>

Notwithstanding anything to the contrary herein or in the Agreement or the
Definitions, Party A may, in its sole discretion and at its expense, terminate
this Transaction on any day from and including 15JUN08 to but excluding the
Termination Date (the "Optional Termination Date"), in accordance with this
Additional Optional Termination provision. The cancellation premium owned by
Party A with respect to such Optional Termination Date is set forth under
Section (i) below. Party A may only elect an Optional Termination Date by
providing oral (including telephonic) notice of such election to Party B two
New York and London Business Days prior to such Optional Termination Date, on
or before 11:00 a.m. New York City time. Party A shall provide written
confirmation of any telephonic notice within one New York and London Business
Day of that notice. Failure to provide that written confirmation will not
affect the validity of the telephonic notice.

The Cash Settlement Amount payable by Party A on the Optional Termination Date
shall be calculated as the sum of the following:

(i) the cancellation premium, in accordance with the Optional Termination Date
schedule as set forth below:

Optional Termination Period Amount

15JUN08 to but excluding 15JUN09 USD 1,593,750.00

15JUN09 to but excluding 15JUN10 USD 1,062,500.00

15JUN10 to but excluding 15JUN11 USD 531,250.00

<PAGE>
15JUN11 and thereafter USD 0.00

(ii) the net of the accrued but unpaid amount between the Fixed Rate Payer and
the Floating Rate Payer from and including the last Payment Date to but
excluding the Optional Termination Date.

Nothing herein shall obligate Party A to elect the Optional Termination Date as
provided herein.

RECORDING OF CONVERSATIONS:

Each party to this Transaction acknowledges and agrees to the tape recording of
conversations between the parties to this Transaction whether by one or other or
both of the parties or their agents, and that any such tape recordings may be
submitted in evidence in any Proceedings relating to the Agreement and/or this
Transaction.

<Table>
<S>      <C>                                 <C>               <C>
ACCOUNT DETAILS:

         Account for payments to                               USD
         Party A:                            Pay to:           Bank of America NA New York
                                             ABA#:             026009593
                                             For Account of:   Bank of America NA Charlotte
                                             Account Number:   6550-219386
                                             Swift Code:       BOFAUS6SGDS

         Account for payments to                               USD
         Party B:                                              To be advised

OFFICES:

         The Office of Party A for this
         Transaction is:                     Charlotte - NC, United States
                                             Please send reset notices to fax no. (+1 312) 234 3603

         The Office of Party B for this
         Transaction is:                     Franklin - TN, United States
</Table>

Please confirm that the foregoing correctly sets forth the terms and conditions
of our agreement by returning via telecopier an executed copy of this
Confirmation to the attention of Global Derivative Operations (fax no. (+1 312)
234 3603).

                                                                               4
<PAGE>

                            Accepted and confirmed as of the date first written:
Bank of America, N.A.       Psychiatric Solutions

/s/ Dean Walker             /s/ Brent Turner
---------------------       -----------------------
Dean Walker                 Name:  Brent Turner
Senior Vice President       Title: Treasurer
Authorised Signatory

Our Reference Number:  3224402
Internal Tracking No:  7649771

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