
    Dwight DURAN, Lonnie Duran, Sharon Towers, and all others similarly situated, Plaintiffs-Appellees, v. Garrey CARRUTHERS, Governor of The State of New Mexico, O.L. McCotter, Secretary of Corrections, and Robert J. Tansy, Warden of the Penitentiary of New Mexico, Defendants-Appellants. Mountain States Legal Foundation, Amici Curiae, on behalf of its members, the State of Kansas, and the State of Utah. Amici Curiae of the States of Hawaii, Oregon, Utah, Washington, and Wyoming, in support of Appellants.
    No. 88-1442.
    United States Court of Appeals, Tenth Circuit.
    Sept. 15, 1989.
    Joel I. Klein of Onek, Klein & Farr, Washington, D.C. (Hal Stratton, Atty. Gen., Henry M. Bohnhoff, Deputy Atty. Gen., James Bieg, Asst. Atty. Gen., Santa Fe, N.M., Norman S. Thayer, Saul Cohen, and Stephany S. Wilson of Sutin, Thayer & Browne, Albuquerque, N.M., and Paul M. Smith of Onek, Klein & Farr, Washington, D.C., with him on the brief), for defendants-appellants.
    Elizabeth Alexander, Washington, D.C. (Mark J. Lopez and Alvin J. Bronstein, National Prison Project of the ACLUF, Inc., Washington, D.C., Ray Twohig, P.C., Albuquerque, N.M., and Mark H. Donatelli of Rothstein, Bailey, Bennett, Daly & Do-natelli, Santa Fe, N.M., with her on the brief), for plaintiffs-appellees.
    Paul Farley, Mountain States Legal Foundation, Denver, Colo., Robert T. Stephan, Atty. Gen., State of Kan., Topeka, Kan., and David L. Wilkinson, Atty. Gen., State of Utah, Salt Lake City, Utah, for the amici curiae, on behalf of the Mountain States Legal Foundation, its members, the State of Kan., and the State of Utah.
    Warren Price, III, Atty. Gen., State of Hawaii, and Steven S. Michaels, Deputy Atty. Gen., Honolulu, Hawaii, Dave Frohn-mayer, Atty. Gen., State of Or., David L. Wilkinson, Atty. Gen., State of Utah, Kenneth O. Eikenberry, Atty. Gen., State of Wash., and Joseph B. Meyer, Atty. Gen., State of Wyo., for the amici curiae States of Hawaii, Oregon, Utah, Wash., and Wyo.
    Before SEYMOUR, EBEL and McWILLIAMS, Circuit Judges.
   McWILLIAMS, Circuit Judge.

This appeal is from an order of the United States District Court for the District of New Mexico denying the defendants’ motion to vacate certain parts of a consent decree. Our study of the matter convinces us that the district court did not err in denying defendants’ motion to vacate. Accordingly, we affirm.

By a first amended complaint filed July 6, 1978, Dwight Duran, and others, all inmates of the Penitentiary of New Mexico (“PNM”), instituted a class action charging that conditions in the penitentiary violated rights guaranteed them by the United States Constitution and by federal statutes. Jurisdiction was based on 28 U.S.C. § 1331. Named as defendants were the following:

1. Hon. Jerry Apodaca, Governor of the State of New Mexico;
2. Charles Becknell, Secretary of Criminal Justice for the State of New Mexico;
3. Edwin Mahr, Director of the Corrections Division for the State of New Mexico;
4. Levi Romero, Warden of the Penitentiary of New Mexico;
5. Robert Montoya, a Deputy Warden of the Penitentiary of New Mexico; and
6. Joseph Lujan, a Deputy Warden of the Penitentiary of New Mexico.

Partial consent agreements, covering visitation, access to legal services, and food services, were signed by the parties in 1979, and orders reflecting the agreements were entered by the court. Those partial consent decrees are not the subject of this appeal. In February, 1980, a bloody riot occurred in the Penitentiary of New Mexico in which twelve correctional officers were taken hostage, thirty-three inmates were killed, at least ninety were seriously injured, and damage to the prison facilities measured in the millions of dollars.

In this general setting the parties entered into a consent decree which was approved by the district court on July 14, 1980. This negotiated decree was elaborate, extending well over 100 printed pages, and by its provisions regulated many aspects of the prison operation. In provisions not challenged in the present proceeding, the decree comprehensively regulates the defendants’ conduct in the penitentiary in the area of (1) food services, (2) physical facilities, including clothing and personal hygiene items provided to inmates, (3) medical care, (4) mental health care, (5) correspondence between inmates and outsiders, (6) access to legal resources, and (7) attorney-client visitations.

On June 12, 1987, the Attorney General for the State of New Mexico filed a motion to vacate seven parts of the 1980 consent decree. The motion was filed on behalf of the Hon. Garrey Carruthers, who was then the Governor of New Mexico, and on behalf of the other individuals named as defendants in the amended complaint, or their successors. The motion to vacate was signed not only by the state’s Attorney General, but also by private counsel located in Albuquerque, New Mexico and Washington, D.C.

Specifically, the defendants moved to vacate the following portions of the 1980 consent decree:

1. Paragraph 6 in the July 14, 1980 Agreement, except for the first sentence.

2. Paragraphs 1 through 15 in the “Classification” section of the consent decree.

3. Paragraphs 1 through 10, except for the first sentence of paragraph 7 and the second sentence of paragraph 10 and paragraph 11(f) in the “Maximum Security” section of the decree.

4. Paragraphs 1 through 11 and 14 through 18 of the “Inmate Discipline” section of the decree.

5. Paragraphs 1 through 7, 9 through 12, 14 through 18 and the prologue of the “Inmate Activity” section of the decree.

6. Paragraphs 1, 2, 4(A) and 4(M), except as they apply to inmates housed in the PNM-Main, or facilities operated for specialized mental-health care, maximum security or disciplinary segregation, paragraph 8, as it applies to provision of cigarettes and tobacco, and paragraph 11 as such appears in the “Living Conditions” section of the decree.

7.Paragraphs 1 through 10, 11(E), 13 through 15, plus the probable cause provision in paragraph 11(D) and the probable cause and reasonable suspicion requirements in paragraph 12 in the “Visitation” section of the decree.

Defendants’ basic position is that the portions of the consent decree which they seek to vacate are not directly related to federally created rights nor do they tend to vindicate federal rights. Rather, the defendants argue that at best they may relate to, and vindicate, rights created by the State of New Mexico, and that some others relate only to better penological practices. Such remedies, according to the defendants, are beyond the reach of a federal district court, and should therefore be removed from the consent decree. In this argument, defendants place considerable reliance on Pennhurst State School and Hospital v. Halderman, 465 U.S. 89, 104 S.Ct. 900, 79 L.Ed.2d 67 (1984), where the Supreme Court held that the Eleventh Amendment prohibited a federal district court from ordering state officials to conform their conduct to state law.

At the outset it should be remembered that in the instant case there was no trial. We have a first amended complaint filed July 6, 1978, followed by several partial consent decrees in 1979, culminating in an elaborate and all-encompassing final consent decree on July 14, 1980. Consequently, the first amended complaint should be our starting point.

In a “preliminary statement” to the first amended complaint the plaintiffs contend that “the totality of the overcrowding and other conditions at PNM fall beneath standards of human decency, inflict needless suffering on prisoners and create an environment which threatens prisoners’ mental and physical well-being and results in physical and mental deterioration and dehabili-tation of the prisoners confined therein, which is both unnecessary and penologically unjustifiable.” By further prefatory statement, the plaintiffs asked the district court, after hearing, to declare that the totality of prison conditions are unconstitutional under the Constitutions of the United States and New Mexico and in violation of the statutes of the United States and New Mexico.

The plaintiffs’ first claim for relief was filed under 42 U.S.C. § 1983 to redress injuries suffered by the plaintiffs, and the class they sought to represent, for deprivation by the defendants of rights secured the plaintiffs by the first, sixth, eighth, ninth and fourteenth amendments to the United States Constitution. Specific constitutional rights allegedly violated by the defendant were the rights to be free from cruel and unusual punishment, to due process, to religious freedom, to freedom of expression and association, to have access to courts, to privacy, and to equal protection.

A second claim for relief was based on Article II, section 13 of the New Mexico Constitution prohibiting cruel and unusual punishment. It was also alleged in the second claim for relief that the conditions at the penitentiary violated plaintiffs’ rights to freedom of speech, religion, equal protection, due process, and other rights guaranteed by Article II, sections 11, 17, and 18 of the New Mexico Constitution.

In their third claim for relief, the plaintiffs alleged that the several defendants had failed to exercise their duties to operate the penitentiary in accord with Article II, section 4 of the New Mexico Constitution and N.M.StatAnn. §§ 44-1-38, 42-1-1.1, 42-1-31.2, 42-9-6(G), and 42-9-6(H).

The fourth claim for relief was based on provisions of the United States Law Enforcement Assistance Administration, 42 U.S.C. § 3750b, with the plaintiffs claiming that they were third party beneficiaries under contractual arrangements between the Administration and the defendants.

Under the section heading “Factual Allegations,” the plaintiffs set forth in the first amended complaint the facts underlying all of their several claims for relief. Specifically, plaintiffs alleged that the penitentiary was “grossly and inhumanely overcrowded.” According to the first amended complaint, some of the prisoners were forced to live in cells which were approximately 6' X 9' in size, with two or more persons being housed in one cell, and that the majority of the prisoners were housed in dormitories which were overcrowded, filthy and impossible to keep clean. Such overcrowding, plaintiffs alleged, destroyed any possibility of privacy and rendered the quarters unfit for human habitation because of mice, roaches, vermin, clogged toilets, and the like.

The plaintiffs also complained about food service, physical and sexual assaults by other prisoners, understaffed professional, educational and security personnel, improper classification of inmates according to their educational, vocational and health needs, lack of meaningful industrial or institutional employment, inadequate recreational activities, unduly restrictive visitation rights and correspondence policies, inadequate medical and dental care, lack of access to legal books and resources, and disciplinary proceedings that were devoid of due process.

Based upon the factual allegations, the plaintiffs sought class action certification, a declaratory judgment that the “totality of the conditions” at the penitentiary violated the rights of the plaintiffs established by the constitutions of the United States and of New Mexico and by both federal and local state statutes, and a preliminary and permanent injunction directing the defendants to comply with the various constitutional and statutory mandates. The plaintiffs also sought to require the defendants to pay the costs of the action, including attorneys’ fees pursuant to 42 U.S.C. § 1988.

As above stated, the parties submitted several partial consent decrees to the district court in 1979, and orders were entered in accord with the matters agreed to by the parties. And on July 14, 1980, a final consent decree was entered by the court reflecting the agreements between the parties. These orders covered such items as correspondence policies and practices, attorney-prisoner visitations, food service, inmate legal access, visitation rights, classification of inmates, living conditions, inmate activity, medical care, mental health care, staffing and training of prison personnel, maximum security classification, and inmate discipline procedure.

A prefatory statement in the final consent decree stated that the agreement was voluntarily and mutually agreed upon as a compromise settlement of the dispute between the parties. Another statement in the final agreement between the parties read as follows:

Those policy statements and the partial consent decrees on file herein may include specific requirements and procedures beyond what is required by the Constitution of the United States, the Constitution of the State of New Mexico, the federal Civil Rights Act, the New Mexico Torts Claim Act, or any other constitutional, statutory or common law requirement.

Article XI of the United States Constitution provides as follows:

The Judicial power of the United States shall not be construed to extend to any suit in law or in equity, commenced or prosecuted against one of the United States by Citizens of another state or by Citizens or Subjects of any Foreign State.

A literal reading of the eleventh amendment would appear to bar only suits against a state by a citizen of another state. However, it has been interpreted to also bar suits against a state brought by its own citizens. Hans v. Louisiana, 134 U.S. 1, 10 S.Ct. 504, 33 L.Ed. 842 (1890). In the instant case, the plaintiffs are citizens of New Mexico, and the State of New Mexico, as such, is not named as a defendant. The defendants are, however, various state officials, and the immunity granted in the eleventh amendment to the state bars a suit against a state official when the suit is one which, in essence, would operate against the state. Edelman v. Jordan, 415 U.S. 651, 94 S.Ct. 1347, 39 L.Ed.2d 662 (1974). However the eleventh amendment does not bar a suit in federal district court against a state official seeking injunctive relief where the state official has allegedly violated federal law. Ex parte Young, 209 U.S. 123, 28 S.Ct. 441, 52 L.Ed. 714 (1908). The Eleventh Amendment does, however, prohibit a federal district court from granting injunctive relief against a state official who has allegedly violated only state law, as opposed to federal law. Pennhurst State School and Hospital v. Halderman, 465 U.S. 89, 104 S.Ct. 900, 79 L.Ed.2d 67 (1984).

In the instant case, the plaintiffs instituted a suit against state officials alleging that they violated, inter alia, the federal constitution and federal statutes. Under Ex parte Young, supra, the defendants under the eleventh amendment are not immune from such a suit. Counsel agrees that those parts of the consent decree setting forth rules and regulations for prison conduct which are directly related to federally protected rights, or tend to vindicate those rights, are proper, and are not here challenged. However, it is counsel’s further position that those parts of the consent decrees which defendants seek to have vacated represent remedies that are not directly related to federally protected rights, nor do they tend to vindicate such rights. With the latter proposition, we disagree.

Arguably, the provisions which the defendants seek to vacate do relate to, or tend to vindicate, federally protected rights. In addition, the defendants, by the consent decrees, waived their right to make plaintiffs establish at trial that they were entitled to all the relief afforded them by the consent decrees. In this latter connection, the Supreme Court, in Swift & Co. v. United States, 276 U.S. 311, 329, 48 S.Ct. 311, 316, 72 L.Ed. 587 (1928), commented as follows:

Here again, the defendants ignore the fact that by consenting to the entry of the decree, “without any findings of fact,” they left to the Court the power to construe the pleadings, and in so doing, to find in them the existence of circumstances of danger which justified compelling the defendants to abandon all participation in these businesses, and to abstain from acquiring any interest hereafter.

The defendants’ first request in their motion to vacate was that paragraph six in the 1980 consent decree be vacated, except for the first sentence thereof. See n. 3 supra. We regard paragraph six to concern procedure, rather than substance. It provides that no change which will lessen the benefits provided by the agreement and decree may be made, and then goes on to outline the procedure to be followed when the defendants proposed to “implement” the decree, namely, 30 days notice to plaintiffs prior to any implementation, granting plaintiffs 15 days to file any objection to a proposed change, requiring the parties to attempt to informally resolve any dispute, and providing for unresolved matters to be resolved by the district court after a hearing wherein the defendants have the burden of showing that the proposed change is just and will not lessen the benefits provided by the decree. These procedural safeguards for the plaintiffs, which the defendants in the consent decree saw fit to grant, attach to all the remedies provided in the decree, many of which defendants concede have a direct relationship to federal rights and which are not challenged in this case. Such being the case, the district court, in our view, did not err in refusing to vacate paragraph six, as requested by the defendants.

The other parts of the consent decree which the defendants seek to have vacated relate to classification of inmates, maximum security, inmate discipline, inmate activity, living conditions, and inmate visitation rights. As indicated, it was, and is, the plaintiffs' position that it was the “totality” of the prison conditions, not necessarily any one condition, which violated their federally protected rights. In our view, each of the matters which form the basis of this case is a part of that “totality” and does bear on, or tend to vindicate, federal rights. Further, by the 1980 agreement and the consent decree based thereon, the defendants waived their right to trial. Quite conceivably, if the case had gone to trial plaintiffs’ evidence might well have established that the remedies now complained about are indeed tied to federal rights, or at least tend to vindicate such rights. But the defendants voluntarily waived their right to insist that the plaintiffs prove their case in open court.

We reject the defendants’ argument that the Eleventh Amendment dictates the granting of their motion to vacate. As indicated, counsel concedes that the district court had the jurisdiction and authority to grant relief to these plaintiffs against these defendants where prison conditions violated federal rights, be they constitutional or statutory. That concession wipes out much of the defendants’ Eleventh Amendment argument. In Local No. 93 v. City of Cleveland, 478 U.S. 501, 106 S.Ct. 3063, 92 L.Ed.2d 405 (1986), the Supreme Court in a Title VII case, where a consent decree was entered, spoke as follows:

Accordingly, a consent decree must spring from and serve to resolve a dispute within the court’s subject matter jurisdiction. Furthermore, consistent with this requirement, the consent decree must “com[e] within the general scope of the case made by the plaintiff ... and must further the objectives of the law upon which the complaint was based.... However, in addition to the law which forms the basis for the claim, the parties’ consent animates the legal force of a consent decree_” Therefore, a federal court is not necessarily barred from entering a consent decree merely because the decree provides broader relief than the court could have awarded after trial (citations omitted).

As stated, central to defendants’ argument is Pennhurst State School and Hospital v. Halderman, 465 U.S. 89, 104 S.Ct. 900, 79 L.Ed.2d 67 (1984). Such reliance is in our view misplaced. The Supreme Court in Pennhurst held that the Eleventh Amendment prohibited a federal district court from ordering state officials to conform their conduct to state law. That is not our case. Here, the district court ordered state officials to conform their conduct to federal law, and the provisions of the decree which the defendants seek to vacate tend to vindicate those rights. And even if they didn’t bear directly on federal rights, the provisions sought to be vacated come within the rule of Local No. 93 v. City of Cleveland, supra, i.e., (1) the consent decree springs from and serves to resolve a dispute within the district court’s subject matter jurisdiction; (2) the consent decree comes within the “general scope” of the case made by plaintiffs in the first amended complaint; and (3) furthers the objectives upon which the complaint is based, in which event “the parties’ consent animates the legal force of a consent decree” and a district court is not barred from entering a consent decree providing broader relief than the court might possibly have been empowered to enter after trial.

Kozlowski v. Coughlin, 871 F.2d 241 (2d Cir.1989), resembles our case. In that case state officials appealed from a consent decree which established procedures and sanctions governing the suspension and termination of prison visitation rights, arguing that the sanctions, unlike the procedures, in the decree were unrelated to the underlying due process violation, and that accordingly the Eleventh Amendment barred subject matter jurisdiction. A divided panel of the Second Circuit rejected that argument and spoke as follows:

Before entering a consent judgment, the district court must be certain that the decree 1) “spring[s] from and serve[s] to resolve a dispute within the court’s subject matter jurisdiction,” 2) “come[s] within the general scope of the case made by the pleading,” and 3) “further[s] the objectives of the law upon which the complaint was based.” Firefighters, 478 U.S. at 525 [106 S.Ct. at 3077] (other citations omitted). These three conditions are sufficient even if the decree contains broader relief than the court could have awarded after trial.

Judgment affirmed. 
      
      . The district court’s Memorandum Opinion and Order was published and appears as Duran v. Carruthers, 678 F.Supp. 839 (D.N.M.1988). The background chronology is fully set forth therein and will not be repeated in great detail here.
     
      
      . The first amended complaint also set forth in a second and third claim violations of the New Mexico state constitution, and New Mexico state statute. A fourth claim for relief alleged violations of the United States Law Enforcement Assistance Administration, 42 U.S.C. § 3750b. However, none of these claims plays any role in the present proceeding.
     
      
      . The Secretary of Criminal Justice is appointed by the Governor.
     
      
      . All defendants were represented in the district court by the Attorney General for New Mexico.
     
      
      . An earlier motion to vacate the 1980 consent decree in its entirety was withdrawn.
     
      
      . 6. Other than in times of emergency, changed circumstances may, in the future, justify some changes in this agreement and the policies attached hereto and the partial consent decrees on file herein. No change or changes may be made which will lessen the benefits provided fay the agreement and the policies attached hereto and the partial consent decrees on file herein. Notice will be given to the lawyers for the Plaintiffs at least thirty (30) days prior to the proposed implementation date. Said notice will contain the proposed change or changes and the reasons therefore. Counsel for the Plaintiffs will ascertain whether, in their opinion, the proposed change or changes in any way lessen the benefits provided by this agreement or the policies attached hereto and the partial consent decrees on file herein. If so, they will notify Defendants of their objections and the reasons therefore within fifteen (15) days. Efforts will be made to informally resolve the matter. If the dispute cannot be resolved, it will be submitted to the court. The burden will then be on the Defendants to justify that the change or changes should be made and will not lessen the benefits provided by the agreement and the policies attached hereto and the partial consent decrees on file herein before the change or changes will be allowed.
     
      
      . In greater detail, the contested provisions (1) requires appellants to follow specified procedures and criteria in classifying inmates to different security levels, and severely restricts both the amount of time and the circumstances in which they may use the “maximum security” classification; (2) sets out the exclusive list of actions that may form the basis for inmate discipline, as well as the maximum penalties; (3) mandates that eight hours of vocational or educational activity per day be made available to each inmate; (4) prohibits, in all prisons and under all circumstances, the housing of two inmates in the same cell; and (5) comprehensively regulates the prison policies on visitations, including the types of searches that may be made in relation to such visits.
     
      
      . The eleventh amendment was adopted in response to Chisholm v. Georgia, 2 U.S. 4A (1793) which allowed a suit by two South Carolinians, on behalf of a British subject, against the State of Georgia.
     
      
      . Such a "totality of the circumstances" approach was approved by the Supreme Court in Hutto v. Finney, 437 U.S. 678, 685-89, 98 S.Ct. 2565, 2570-73, 57 L.Ed.2d 522 (1978).
     
      
      . Indeed, there is ample authority for finding that each of the contested sections vindicates a federal right. In Ramos v. Lamm, 639 F.2d 559 (10th Cir.1980), cert. denied, 450 U.S. 1041, 101 S.Ct. 1759, 68 L.Ed.2d 239 (1981), this court reaffirmed that there is a constitutional right to be reasonably protected from constant threats of violence and sexual assaults from other prisoners. More specifically, this court indicated that, although such a remedy was not warranted under the facts in Ramos, there may be a point where motility, classification, and idleness could constitute an actual violation of the eighth amendment. Id. at 566-67.
      Similarly, the provisions regarding inmate visitation do not go beyond what could be ordered by a court. See Pell v. Procunier, 417 U.S. 817, 94 S.Ct. 2800, 41 L.Ed.2d 495 (1974). Indeed, in 1984 the Department of Corrections’ own analysis of the visitation provisions reached the conclusion that the decree did not go beyond those visitation rights that could be constitutionally imposed in its absence. Attachment A to Plaintiffs Supplemental Response to Defendant’s Motion to Vacate or Modify the Judgment, filed 1/6/86.
      All of the other contested provisions may be similarly justified. See Rhodes v. Chapman, 452 U.S. 337, 101 S.Ct. 2392, 69 L.Ed.2d 59 (1981)
      (overcrowding may be a constitutional violation); Ruiz v. Estelle, 679 F.2d 1115 (5th Cir.1952) (court may impose prophylactic rules to prevent repetition of constitutional violations).
      However, it must be noted that the contested provisions should not be viewed in isolation, but rather as part of the "totality of the circumstances" existing at PNM. Hutto v. Finney, 437 U.S. 678, 98 S.Ct. 2565, 57 L.Ed.2d 522 (1978).
     
      
      . In Pennhurst, judgment was entered after a "lengthy trial’’ and did not, as here, involve a consent decree.
     
      
      . The present appeal concerns only the propriety of the district court's order denying defendants’ motion to vacate parts of the 1980 consent decree. We are not here concerned with defendants’ right, if any, to have "equitable modification" of that decree.
     