Roderick J. Grabowski has appealed the denial of his 28 U.S.C. § 2254 petition for writ of habeas corpus, challenging the legality of his conviction, and the denial of his 42 U.S.C. § 1983 prisoner complaint, challenging various aspects of his confinement as a pretrial detainee. For the reasons set forth below, we AFFIRM the dismissal of the ha-beas corpus petition. With respect to the prisoner complaint, we REMAND to the trial court for further consideration of the allegation regarding Grabowski’s placement in a cellblock of predominantly black inmates and we AFFIRM the dismissal of the remainder of the petition.
I.The Habeas Corpus Petition, 28 U.S.C. § 2254
Facts and Proceedings
On December 15, 1988, Roderick Grabow-ski was arrested in Harrison County, Mississippi and charged with armed robbery and burglary/larceny of a dwelling. He was later indicted on both charges and initially pled not guilty. He moved to suppress various items seized from his car but the motion was denied. On the day of trial, the armed robbery charge was reduced to robbery and Grabowski pled guilty to robbery and burglary. Pursuant to the plea bargain, the prosecution recommended a sentence of fifteen years for the robbery and ten years, concurrently, for burglary. This was the sentence imposed.
Grabowski filed a pro se application for post-conviction relief. After exhausting state remedies, he filed a Petition for Writ of Habeas Corpus in the United States District Court under 28 U.S.C. § 2254. He made the following allegations:
1. His guilty plea was induced by coercion.
2. He did not receive the effective assistance of counsel.
3. His arrest and the search of his ear were illegal.
4. His convictions violated double jeopardy.
On January 31, 1994, the District Court denied his petition.
The Guilty Plea
Grabowski challenges the legality of his guilty plea, claiming it was coerced. He alleges that the prosecution threatened to seek an habitual offender bill against him which could result in a mandatory 30 year sentence if he didn’t agree to the proposed plea bargain. Grabowski argues that his pri- or criminal record was in fact insufficient to justify such a sentence, and therefore he was coerced into pleading guilty by erroneously based threats.1
On the trial date, Grabowski’s public defender moved to withdraw from the case and for a continuance because of a possible conflict of interest.2 At that point, the prosecutor stated:
The State is ready for trial and its witnesses are here, its evidence here on Mr. Grabowski and Mrs. Christianson. The State is ready to move forward. I would advise the Court in all sincerity that since the indictment in February of 1989 of Mr. Grabowski the State has learned that he has at least five prior felony convictions. If there is a continuance today this is not a threat by any means to Mr. Grabowski or this Court. The State is going to bring in the Grand Jury, nolle pros his cases and reindict Mr. Grabowski as perhaps a life habitual offender. I just want all the cards on the table.
The trial court denied the motion to withdraw. Grabowski then pled guilty pursuant to the plea bargain.
*1389The District Court correctly found Grabowski’s guilty plea to be free and voluntary and not the result of coercion. To be valid, a guilty plea must be knowingly, intelligently and voluntarily entered. The defendant must be shown to understand the nature of the charges and the consequences of the plea. Boykin v. Alabama, 395 U.S. 238, 89 S.Ct. 1709, 23 L.Ed.2d 274 (1969); Hobbs v. Blackburn, 752 F.2d 1079 (5th Cir.1985); Diaz v. Martin, 718 F.2d 1372 (5th Cir.1983).
The guilty plea proceeding in this case was detailed and painstaking. Grabowski acknowledged his understanding of the charges, the consequences of the plea and his constitutional rights. The plea agreement was discussed, including the recommendation of the prosecution for concurrent fifteen and ten year sentences. Grabowski himself provided the factual basis for the charge by explaining what he had done. The record indicates the plea was knowingly and voluntarily entered.3
Of course, a guilty plea is invalid if it is produced “by actual or threatened physical harm or by mental coercion overbearing the will of the defendant.” Brady v. United States, 397 U.S. 742, 750, 90 S.Ct. 1463, 1470, 25 L.Ed.2d 747 (1970). Not all pressures to plead, however, are considered illegal inducements. Threatening harsher penalties, including indictment as an habitual offender, is a legitimate negotiating tactic in the give and take of plea bargaining. Brady v. United States, supra; Bordenkircher v. Hayes, 434 U.S. 357, 98 S.Ct. 663, 54 L.Ed.2d 604 (1978). As long as the prosecution has probable cause to believe the defendant is guilty of the allegation being made, the decision of whether or not to so prosecute is within its discretion. Bordenkircher v. Hayes, supra. The District Court correctly found that Grabow-ski’s prior criminal record, which included by his own admission, felony convictions in three different states, justified a probable cause conclusion that he could be charged as a habitual offender under Mississippi law. Finally, Grabowski was specifically asked if his plea was induced by promises or coerced by threats and he answered no.
The guilty plea was validly entered.
Ineffective Assistance of Counsel
Grabowski alleges his appointed counsel was ineffective. In order to succeed on an ineffectiveness claim, a petitioner must establish (1) that counsel’s performance was deficient in that it fell below an objective standard of reasonable professional services, and (2) that this deficient performance prejudiced the defense such that there is a reasonable probability that the outcome of the trial has been undermined and the result would have been different. Strickland v. Washington, 466 U.S. 668, 104 S.Ct. 2052, 80 L.Ed.2d 674 (1984).
The District Court correctly noted that Grabowski received substantial benefits with his plea bargain. One charge was reduced 4 and he received concurrent sentences. He also avoided entirely being prosecuted as an habitual offender, despite having a number of prior convictions.
The crux of Grabowski’s complaint is that (a) his counsel misinformed him that he was subject to an habitual offender life sentence if he refused the plea bargain; and (b) his counsel had a conflict of interest since Grabowski had sued the Public Defender’s Office, which employed the attorney. As already noted, the District Court correctly found that the prosecutor’s threat to seek a possible indictment against Grabowski as a habitual offender was not factually erroneous nor was it improper coercion. Consequently, trial counsel was not delinquent in warning Grabowski of that possibility. With regard to the law suit, Grabowski’s attorney did attempt to withdraw as counsel because of *1390the law suit, which motion was denied.5 At the Boykin hearing, the trial court carefully questioned Grabowski regarding the suit and its impact on the plea. Grabowski stated clearly that he considered his counsel to be a good lawyer, that the law suit had to do with other staff, not the attorney, and that he was satisfied with the representation. Likewise, the record indicates no relationship, much less an adverse one, between Grabowski’s complaints in his lawsuit and the competency of his attorney at the guilty plea proceedings.
Trial counsel was not ineffective.
Arrest Without A Warrant
Grabowski complains that he was arrested without probable cause and his car was illegally searched in violation of the Fourth Amendment. Items allegedly stolen in a burglary were found in the trunk.
The District Court correctly concluded that these claims were waived by Grabowski’s plea of guilty. A knowing and voluntary plea of guilty waives all preceding non-jurisdictional defects, including Fourth Amendment claims. United States v. Diaz, 733 F.2d 371, 376 n. 2 (5th Cir.1984); Williams v. Wainwright, 604 F.2d 404, 406-07 (5th Cir.1979); Ortega-Velasquez v. United States, 465 F.2d 419 (5th Cir.1972).
Grabowski was also specifically advised at the guilty plea hearing that his plea would require him to surrender any allegations of illegal arrest, search or seizure:
Q. There could be other constitutional rights such as illegal arrest and illegal search and seizure and a lot of others; even though, I have not specifically mentioned these other constitutional rights or gone over them (in) detail with you, if I accept your plea of guilty this morning, you, in fact, waive or give up all of your constitutional rights insofar as they apply to these two indictments and these two crimes; do you understand that?
A. Yes, Your Honor.
(Record, Vol. 1, p. 217)
Grabowski alleges that his attorney told him he could raise this issue, post-conviction, despite the guilty plea. That claim is negated by Grabowski’s own words at the guilty plea hearing. Additionally, his trial attorney, in an affidavit, states emphatically that “(a)t no time” did he tell Grabowski that he could successfully attack his conviction through post-conviction relief once he accepted the plea bargain.6
The claim is without merit.
Double Jeopardy
Finally, Grabowski alleges his convictions violate double jeopardy because the evidence and elements of the crime of burglary/larceny are the same as the crime of robbery.
The District Court correctly found no double jeopardy violation. The test for double jeopardy is whether each offense requires proof of an additional fact which the other does not. Blockburger v. United States, 284 U.S. 299, 52 S.Ct. 180, 76 L.Ed. 306 (1932). Under Mississippi law, the offenses of burglary and robbery consist of different elements. Burney v. State, 515 So.2d 1154 (Miss.1987); Wright v. State, 540 So.2d 1 (Miss.1989); Miss.Code Ann. Sect. 97-3-73 (1972).
There was no double jeopardy violation.
Conclusion
The District Court correctly rejected Gra-bowski’s various allegations regarding the va*1391lidity of his conviction. The petition for ha-beas corpus relief was properly denied.
II. The Prisoner Civil Rights Complaint, 42 U.S.C. § 1983
Facts and Proceedings
In May, 1989, plaintiff Grabowski filed a pro se 42 U.S.C. § 1983 law suit alleging various constitutional deprivations while he was imprisoned as a pretrial detainee at the Adult Detention Center (ADC), Jackson County, Mississippi. In June, 1990, the District Court dismissed the petition on the basis that it failed to state a cause of action. On appeal, we upheld the dismissal as to some of the claims but remanded three to the District Court for adjudication on the merits 7:
(1) The allegation that Grabowski’s visitation privileges were revoked without a hearing and as punishment;
(2) The allegation that Grabowski was denied telephone and recreation privileges without a hearing while in protective custody and this likewise was done as punishment;
(3) The allegation that Grabowski was used by the prison authorities to discipline black inmates, that the authorities made this known throughout the prison and then subsequently placed him in a cell with predominantly black inmates.
On October 9,1991, an evidentiary hearing was held on Grabowski’s complaint. The Magistrate Judge recommended denial of the petition. The District Court made a de novo review of the record and likewise denied the petition.
In order to frame Grabowski’s issues on appeal in a coherent fashion, we will use the following factual chronology:
2/89 Grabowski arrives at the Adult Detention Center (ADC), charged with felony offenses; he is placed in Cell HE, a unit for pretrial detainees;
2/24/89 Major Robert Mellrath, ADC Director, approves Grabowski for special in-house visitation with his co-defendant girlfriend who is also incarcerated at ADC;
2/27/89 Wendell Poole, a black inmate, is transferred into the HE area after causing trouble in another unit. Grabowski alleges that Officer Brian Grady told him that the classification officer, Vera Simmons, sent Poole to Grabowski so that Grabowski could “take care” of him;
3/6/89 Classification officer, Vera Simmons, receives word by telephone that there is a hold from Florida on Grabowski for a probation/parole violation;
3/9/89 Grabowski is visited by a paralegal from the public defender’s office, Jennifer Garaway. He argues with her and in a loud voice in the presence of other inmates, mostly black, he calls her a “nigger bitch”;
Between 3/9 & 3/14/89 Major Mellrath revokes Grabowski’s in-house visitation due to the incident with Garaway; no hearing is held prior to revocation;
3/20/89 Simmons receives written, but unofficial, verification of the Florida hold;
3/21/89 Grabowski is transferred to AE, a medical unit, because he needs a metal brace on his knee; AE houses both pretrial detainees and post-conviction inmates;
3/27/89 A routine search of the area where Grabowski is housed uncovers tools and other evidence of a possible escape attempt; Grabowski is moved to BE which is a lockdown isolation cell;
4/3/89 Grabowski is moved from BE to KE unit which houses post-conviction prisoners and is predominantly black; the prison officials claim the move occurred because of the probation hold from Florida, indicating he is not pretrial but post-conviction;
Between 4/3 & 4/6/89 Grabowski claims he is attacked and beaten by three black inmates in KE; their stated motivation in assaulting him is his altercation with the paralegal Garaway, his supposed threat to take care of Wendell Poole and his racial prejudice;
4/6/89 A fire is set in Grabowski’s cell; when the officials arrive, Grabowski has a heated argument with a black inmate; Grabowski is moved to protective custody; he is also taken to the nurse. In protec*1392tive custody, where he remains about eleven days, Grabowski has either limited or no access to the telephone and recreation.
To obtain relief under 42 U.S.C. § 1983, a prisoner must prove two elements: (1) a deprivation of a right secured by the Constitution and laws of the United States, and (2) a deprivation of that right by the defendant acting under color of state law.
Loss of In-House Visitation
Grabowski alleges his constitutional rights were violated when his in-house visiting privileges with his imprisoned girlfriend were rescinded after the incident with paralegal Jennifer Gar away. The privileges were revoked without a hearing and Grabowski claims it was done as punishment.
In Bell v. Wolfish, 441 U.S. 520, 99 S.Ct. 1861, 60 L.Ed.2d 447 (1979), the United States Supreme Court set forth the standards for evaluating the constitutional rights of pretrial detainees. Since they are presumed innocent, they cannot be “punished” while in custody. Consequently, the Eighth Amendment standards allowing “punishment” (as long as it is not cruel and unusual) do not apply. Pretrial detainees are, however, subject to restrictions on their liberty insofar as those are necessary for maintenance and security of the jail. This curtailment on liberty must nonetheless comply with due process of law. The test is whether the particular restriction is reasonably related to a legitimate prison objective, other than punishment. If it is, then no right is violated.
In Block v. Rutherford, 468 U.S. 576, 104 S.Ct. 3227, 82 L.Ed.2d 438 (1984), the United States Supreme Court upheld a blanket prohibition against contact visitation for pretrial detainees at the Los Angeles County Central Jail. The Court found the restriction was reasonably related to the legitimate objective of maintaining internal security at the jail.
At the evidentiary hearing, it was established that Grabowski’s in-house visitation was a special accommodation made by the prison at the request of the Public Defender’s Office. Grabowski’s girlfriend was pregnant and had no outside visitors. The privileges were revoked after Grabowski engaged in a shouting match with a paralegal from the Public Defender’s Office in the presence of other inmates, mostly black, during which Grabowski called the paralegal a “nigger bitch.” Major Robert Mcllrath testified that the incident upset the other inmates and that Grabowski’s conduct was not conducive to having the special in-house visitation.
The District Court correctly concluded that Grabowski’s due process rights were not violated by the revocation of his in-house visitation privileges. The privilege had been a special accommodation to begin with, as opposed to a right to which Grabowski was entitled. Furthermore, the privilege was rescinded, not as punishment per se, but as a necessary action reasonably related to the maintenance of prison security and order.
Denial of Telephone/Recreation Privileges in Protective Custody
Grabowski also complains that when he was placed in protective custody, after the alleged beating in KE, he was denied telephone, recreation and canteen privileges without a hearing and as punishment for his prior conduct. The District Court correctly found this claim to be meritless. The hearing disclosed no evidence that Grabowski was being punished while in protective custody; on the contrary, the placement was for his own safety. At most, the evidence indicated that that area of the facility lacked a telephone jack so inmates had to be brought to the booking area at the discretion of the shift lieutenant. Recreation was also apparently subject to the same personnel constraints. No punishment or arbitrary deprivation of privilege was established.
The Place in KE Cell and the Assault
When we remanded this particular issue for adjudication on the merits, our concern was specific. Grabowski alleged that the officials at the prison had used him as a tool to discipline unruly black prisoners, made this use known throughout the prison and subsequently placed him in a cell of predominantly black inmates. We. suggested that these allegations, if proven, could be suffi-*1393eient to establish a callous indifference to Grabowski’s safety.
The evidentiary hearing dispelled those particular concerns. No evidence was presented, other than Grabowski’s own self-serving testimony and lukewarm corroboration by a fellow inmate, Wendell Poole8, that Grabowski was used to discipline inmates, much less that that use was made known throughout the prison. The pertinent officials involved, Vera Simmons and Brian Grady, testified and refuted any such plan or intention. The District Court was correct in denying relief as to that basis.9
While those particular allegations were disposed of on remand, the testimony of the prison officials disclosed a disturbing awareness nonetheless of very real racial tension between Grabowski and the black inmate population just a few weeks prior to the transfer. This awareness coupled with other circumstances of the transfer causes us concern.
It is undisputed that on March 9, 1989, Grabowski had a loud and heated argument with paralegal Jennifer Garaway in the day-room of the cellblock with a number of black inmates present. It is also undisputed that at the end of the altercation, he called her a “nigger bitch.” When Grabowski lost his in-house visiting privileges because of the incident, he complained to Vera Simmons. She wrote a note in response, which was admitted into evidence. It said in part:
You were advised (sic) by us to behave while you are in our facility and we would allow visits. You don’t have to call people nigger bitch to get their attention.
Major Mcllrath, who had allowed the special visits, rescinded them after the incident. At the evidentiary hearing, he said he revoked them because of Grabowski’s “conduct.”
Court: Go into some detail as to what you’re talking about. You say “conduct.” What conduct are you talking about?
Mcllrath: Yelling, carrying on, back in the hall. As I recall, the incident that he’s referring to with Ms. Garaway happened on a day when the whole day room was out for recreation. At the time the day room was being brought back in and there was traffic in the halls, he got into some kind of hassle with Ms. Garaway. At the time there was probably 13, 14, maybe 15 blacks, two or three white, there got to be some hassling going back and forth. What he done was, at that point, not what he was having a problem with Ms. Garaway, but he was causing a disturbance in the hallways which was causing an uproar in the other day rooms and, in my opinion, what he did there in causing them other inmates to get upset and causing problems there was not the type of an action that I would give special privileges to someone for.
Court: So it arose out of the Garaway incident, is that right, the elimination of this special privilege?
Mcllrath: Yes, sir, I — yeah. From the actions that he took, yeah.
Court: All right.
Grabowski: Okay. You said that 14, 15, 16,1 can’t remember that number, but you said a multitude of people were raving. I’m not the only one that was complaining then, was I?
*1394Mcllrath: I know of no one else complaining. I know that people got upset.
Grabowski: Do you know why they got upset?
Mcllrath: I had an idea.
Grabowski: What was your idea?
Mcllrath: My idea was that there was quite a few blacks there that was upset over the way you were talking to Jennifer or whatever it was. I don’t know.
Vera Simmons nonetheless testified that she didn’t recall having any reason to believe Grabowski would have problems when she placed him in a cell with predominantly black inmates.
This placement concerns us also because of its timing. Simmons claimed she made the transfer into KE because she has received written verification on March 20 that Florida had a hold on Grabowski, so she considered him eligible for a post-conviction unit. However, she had received verbal notification of Grabowski’s status several weeks earlier (pri- or to the Garaway incident) and did not move him10. She also acknowledged that the written confirmation of March 20 lacked the necessary documentation to be official.
At the time Simmons received this written notice, Grabowski was in the medical unit. On March 27, he was transferred into isolation because escape tools were found in his living area, an incident which certainly must have displeased the jail authorities. On April 3, Grabowski had a disciplinary hearing before Vera Simmons. He pled guilty to the infraction and was that day transferred by her into the predominantly black post-conviction unit where he allegedly was attacked and beaten.
We are sympathetic to the difficult task jail administrators face in operating their facilities. We recognize that they must deal on a day-to-day basis with the often difficult individuals, forced to live in close quarters 24 hours a day. “(A) federal court should not, under the guise.of enforcing constitutional standards, assume the superintendence of jail administration.” Alberti v. Klevenhagen, 790 F.2d 1220, 1223 (5th Cir.1986). Nevertheless, we must also be mindful that these individuals do not forfeit all their constitutional rights at the prison door. In particular, we must be vigilant with regard to pretrial detainees, who are presumed innocent and are incarcerated, in most instances, because of indigence and inability to pay a bond. It is significant in this case that both the Magistrate Judge and the District Court concluded, despite Vera Simmons’ testimony, that Grabowski was a pretrial detainee at all times relevant to this action.
In deciding the legal standard for Grabow-ski’s complaint, two lines of jurisprudence must be considered: one recognizing a distinction between the rights of pretrial detainees and post-conviction prisoners generally; the other charting the evolution of the “deliberate indifference” standard in assessing the culpability of prison officials, and whether it applies in a condition of confinement other than a medical treatment context. These two tracks have at times paralleled and at times intersected, unfortunately not always with clarity and consistency. We will review them in chronological order.
In Estelle v. Gamble, 429 U.S. 97, 97 S.Ct. 285, 50 L.Ed.2d 251 (1976), the United States Supreme Court for the first time extended the Eighth Amendment’s prohibition against cruel and unusual punishment beyond conditions that are attached to the sentence itself11. A convicted prisoner filed a suit claiming he was subjected to cruel and unusual punishment with regard to treatment he received after an injury in the prison. The petition was dismissed by the district court for failure to state a claim. The Supreme Court observed' that the Eighth Amendment prohibits punishments involving “the unnecessary and wanton infliction of pain.” 429 U.S. at 103, 97 S.Ct. at 290. The Court then held that “deliberate indifference to serious medical needs of prisoners” consti*1395tutes such an unnecessary and wanton infliction of pain12.
In Bell v. Wolfish, 441 U.S. 520, 99 S.Ct. 1861, 60 L.Ed.2d 447 (1979), the Supreme Court faced a challenge to jail conditions lodged not by convicted prisoners but by pretrial detainees. The Court responded by establishing a clear distinction between the constitutional rights of the two groups. Persons already convicted of crimes and sentenced to prison are properly being punished. A challenge to the conditions of confinement is therefore measured against the Eighth Amendment’s ban on cruel and unusual punishment13, as was done in Estelle. Pretrial detainees, on the other hand, have not been found guilty of a crime and therefore cannot be punished while in custody. To do so would punish them without due process of law. At the same time, the high court noted that “(n)ot every disability imposed during pretrial detention amounts to ‘punishment’ in the constitutional sense ...” 441 U.S. at 537, 99 S.Ct. at 1873. Regulation and restraints on liberty necessary for the smooth running of the institution are not punishment. The Supreme Court then articulated the test for a reviewing court dealing with a pretrial detainee. Is the challenged condition or restriction “reasonably related to a legitimate governmental objective,” such as maintaining order and security, or is it is arbitrary or purposeless or excessive, in which ease it is prohibitive punishment? 441 U.S. at 539, 99 S.Ct. at 1874. Significantly, no mention was made of “deliberate indifference” which was an issue of importance in Estelle in evaluating Eighth Amendment complaints by convicted prisoners.
We recognized this distinction between convicted prisoners and pretrial detainees in the en banc decision of Jones v. Diamond, 636 F.2d 1364 (5th Cir.1981)14 and later in Alberti v. Klevenhagen, 790 F.2d 1220 (5th Cir.1986). In Alberti, inmates challenged conditions in the county jail as unconstitutional. Their complaint was that inmate violence and sexual assault were so rampant that the conditions violated the Eighth Amendment.
While Eighth Amendment standards protect those inmates convicted of committing crimes, we note that the Harris County jails also house large numbers of inmates who are awaiting trial and have been unable to secure release. The Due Process Clause of the Fourteenth Amendment accords state pretrial detainees rights not available to convicted inmates ... “Due process requires that a pretrial detainee not be punished. A sentenced inmate, on the other hand, may be punished, although that punishment may not be ‘cruel and unusual’ under the Eighth Amendment.” Wolfish, 441 U.S. at 535 n. 16, 99 S.Ct. at 1872 n. 16, 60 L.Ed.2d at 466 n. 16. However, since incarceration necessarily imposes restrictions on pretrial detainees, such restrictions are valid, absent an intent to punish, if “reasonably related to a legitimate objective” rather than “arbitrary or purposeless.” Id. 441 U.S. at 539, 99 S.Ct. at 1874, 60 L.Ed.2d at 468.
In Alberti, the district court had not expressly drawn this distinction. However, the district court found, as did we, that the violence and sexual abuse were so widespread in the jail that the conditions violated even the greater Eighth Amendment standard against cruel and unusual punishment. Necessarily then the conditions were not “reasonably related to a legitimate objective” but were rather “arbitrary or purposeless.” We also noted the “constitutionally rooted duty of jailers to provide their prisoners reasonable protection from injury at the hands of fellow inmates ...” 790 F.2d at 1224.
The same year as Alberti, we decided Johnston v. Lucas, 786 F.2d 1254 (5th Cir.1986). Petitioner Johnston was a convicted *1396prisoner who was stabbed by another inmate. The various prison officials had ample warning that Johnston was in danger from this particular inmate and had made efforts, ultimately unsuccessful, to keep them separated. Using the Eighth Amendment as a guide and citing Estelle, we concluded that “deliberate indifference” was the appropriate standard to apply in denial of protection claims as well as denial of medical care. Notable, of course, is that Johnston was a convicted inmate, not a pretrial detainee.
In Cupit v. Jones, 835 F.2d 82 (5th Cir.1987), we affirmed the distinction between detainees and convicted prisoners and, in particular, rejected the “deliberate indifference” standard with respect to the detainees in the medical care context. The petitioner was a pretrial detainee who alleged he was denied proper medical attention for his heart condition. The magistrate recommended dismissal of the complaint, specifically finding that the petitioner failed to prove that the prison officials acted with “deliberate indifference” to his needs. The district court granted summary judgment for the defendants. On appeal, we highlighted the distinction between the two classes of inmates because “the due process clause of the fourteenth amendment accords pretrial detainees rights not enjoyed by convicted inmates under the eighth amendment prohibition against cruel and unusual punishment.” 835 F.2d at 84.
Today, we conclude that pretrial detainees are entitled to reasonable medical care unless the failure to supply that care is reasonably related to a legitimate governmental objective.. Furthermore, pretrial detainees are entitled to protection from adverse conditions of confinement created by prison officials for a punitive purpose or with punitive intent. We perceive this holding to be consistent with the criterion for conditions imposed on pretrial detainees set forth by the Supreme Court in Bell v. Wolfish. In so holding, we recognize that the distinction as to medical care due a pretrial detainee, as opposed to a convicted inmate, may indeed be a distinction without a difference, for if a prison official acted with deliberate indifference to a convicted inmate’s medical needs, that same conduct would certainly violate a pretrial detainee’s constitutional rights to medical care. However, we believe it is a distinction which must be firmly and clearly established to guide district courts in their evaluation of future cases involving the constitutionality of all conditions imposed upon pretrial detainees.
835 F.2d at 85. We concluded in Cupit that even though the magistrate applied the wrong standard of “deliberate indifference,” the district court correctly dismissed the suit because the evidence failed to show that Cu-pit was- denied reasonable medical care in the first place.
Thus, as of 1987, we had 5th Circuit precedent, in a condition of confinement cases, acknowledging that pretrial detainees are entitled to greater rights than convicted prisoners. Alberti. We also had precedent holding that the “deliberate indifference” standard was the proper standard to apply in the context of convicted prisoners who claimed denial of medical care or the failure to protect. Johnston. Finally, we had precedent that “deliberate indifference” was not the proper standard to apply in a denial of medical care case involving a pretrial detainee. Cupit.
In Wilson v. Seiter, 501 U.S. 294, 111 S.Ct. 2321, 115 L.Ed.2d 271 (1991), the Supreme Court revisited the “deliberate indifference” standard in connection with an Eighth Amendment challenge to prison conditions generally brought by a convicted inmate15. The Court divided an Eighth Amendment complaint into an objective component — was the deprivation sufficiently serious — and a subjective component — did the official act with a sufficiently culpable state of mind16. 501 U.S. at 298-99, 111 S.Ct. at 2324. With *1397respect to the subjective component, the Court extended the “deliberate indifference” standard, articulated in Estelle with regard to denial of medical care, to Eighth Amendment challenges of prison conditions generally. An inmate has to prove, at a minimum, that the prison official acted with “deliberate indifference” to the challenged deprivation. This, of course, is consistent with the conclusion reached earlier by our court in Johnston v. Lucas, infra.
In Williams v. County of El Paso, No. 91-8505, 966 F.2d 676, an unpublished decision, a pretrial detainee was stabbed by another inmate and claimed a denial of due process in the failure of the prison to protect him. The district court applied a “deliberate indifference” standard which the petitioner claimed on appeal was a more culpable state of mind than required. The Williams panel discussed the easelaw distinguishing pretrial detainees from convicted prisoners generally. The panel cited Alberti. Alberti stated that pretrial detainees had greater rights than convicted prisoners but did not need to discuss the distinction in detail since the conditions of violence in the jail in Alberti were so severe that they violated the Eighth Amendment as well. The Williams panel also noted that we had formulated the less exacting standard of reasonableness with respect to denial of medical care. Nonetheless, the Williams panel then declared that “(u)ntil this court determines, however, that something less than deliberate indifference applies to pretrial detainees in the failure-to-protect context, deliberate indifference is the standard to be applied in this case.” Williams v. County of El Paso, at p. 14. The panel overlooked the message of Alberti, in fact a failure-to-protect case, where we had chided the lower court for failing to draw the distinction between the rights of a convicted prisoner and those of a pretrial detainee. As this court has repeatedly held, one panel cannot overrule another panel, even if one disagrees with the decision. Montesano v. Seafirst Commercial Corporation, 818 F.2d 423 (5th Cir.1987). Williams, therefore, must yield to Alberti.
In Sodie v. Canulette, No. 91-3620, 973 F.2d 923, an unpublished opinion issued shortly thereafter, a pretrial detainee was assaulted by a convicted prisoner and claimed his rights were violated because the jail personnel did not protect him. The So-die panel stated correctly that the standard for a failure-to-protect claim by a convicted prisoner is deliberate indifference. The panel then stated that our court “has refused to find a distinction between convicted inmates and pretrial detainees in a failure-to-protect context,” citing Alberti. Sodie, at p. 517. This was an unfortunate error. Alberti in fact made a point of drawing a distinction between the rights of pretrial detainees and convicted prisoners. Alberti found, under the facts of the case, that the conditions of violence and assault were so egregious that they violated the Eighth Amendment standard, which necessarily violated the lesser standard as well. Again, Sodie must yield to the prior precedent of Alberti.
In Parker v. Carpenter, 978 F.2d 190 (5th Cir.1992), we were concerned with a pretrial detainee who alleged he was moved from a minimum security area in the jail to one housing violent inmates and that this was done in retaliation after an argument with a guard. Once transferred, the petitioner stated he was attacked by another inmate and lost his right eye18. The district court dismissed the petition for failure to state a claim. We reversed. We cited Bell v. Wolfish and Cupit v. Jones in holding that pretrial detainees cannot be subjected to conditions constituting punishment. An action or inaction relating to a detainee is punishment unless it reasonably relates to a legitimate government objective. We specifically found that Parker “has plead that his transfer to the violent inmate section was an act of punishment which is a legal claim cognizable under a 1983 claim.” 978 F.2d at 192. “Deliberate indifference” was not mentioned19. *1398This was a published decision, in accord with Alberti and Cupit.
In Banana v. McNeel, No. 92-7184, 5 F.3d 1495, a subsequent unpublished opinion, the petitioner claimed his rights were violated, in part, because of repeated assaults by other inmates while in custody20. The district court applied the “deliberate indifference” standard. Citing, Sodie and Williams, the Banana panel declared that “deliberate indifference” is the appropriate standard in failure-to-proteet cases. Again, those decisions glossed over the distinction between pretrial detainees and convicted inmates, overlooked the prior precedent of Alberti and likewise Parker. Banana also must yield to the earlier holdings.
We find the allegations and evidence in this case to be analogous to those made in Parker v. Carpenter. In Parker, we remanded for adjudication on the merits, articulating the test to be whether Parker’s transfer to a more violent unit was reasonably related to a legitimate government purpose or whether it was done as punishment or retaliation. We cited Cupit v. Jones which rejected the “deliberate indifference” standard in considering medical claims of pretrial detainees. We hold today that in all conditions of confinement actions, medically related or otherwise, it is not necessary for a pretrial detainee to establish that the official involved acted with “deliberate indifference” in order to establish a due process violation. The test is whether the official action was reasonably related to a legitimate government purpose or whether it was done for the purpose of punishment or retaliation.
We therefore AFFIRM the District Court with respect to Grabowski’s 28 U.S.C. § 2254 petition for writ of habeas corpus. We also AFFIRM the District Court with respect to Grabowski’s 42 U.S.C. § 1983 complaint insofar as it related to the restriction of his visitation, telephone and recreation privileges. We VACATE and REMAND the portion of the petitioner’s § 1983 complaint that related to his cell placement, as the District Court did not review the petitioner’s claim under the appropriate standard. On remand, the District Court should determine whether the placement of Grabowski in the particular cell was reasonably related to legitimate institutional objectives, or whether it was arbitrary or purposeless.