Plaintiffs-appellees 1 are members of the Islamic faith and are incarcerated at the Iowa State Penitentiary. On December 3, 1980, they filed a complaint pursuant to 42 U.S.C. § 1983, alleging numerous claims against officials of the penitentiary for violation of the inmates’ rights to exercise their religion. The inmates sought money damages and injunctive relief.
The district court found that “the plaintiffs have not been discriminated against because of their religious beliefs.” Nevertheless, the court ordered various forms of equitable relief against the prison officials. Because we believe that, when possible, prison officials must be left with discretion to deal with matters of prison security, we reverse the judgment of the district court and vacate the injunction entered against the appellants.
The complaint arose primarily out of an incident which occurred on or about November 17, 1980. On that date, plaintiffs were temporarily denied access to the All-Faiths Chapel at the John Bennett Correctional Facility, where they were incarcerated, until the correctional supervisor who was on duty could check with his superior to make sure their entry should be allowed. Plaintiffs had asked to be allowed into the chapel to perform one of their five daily prayers.
When the officer did clear the matter with his superior, he went to look for the plaintiffs. He found them locked in a coatroom praying. He asked them to leave because they were in an unauthorized area, but they refused to do so. The officer noted and reported this infraction.
A disciplinary hearing committee found each of the plaintiffs guilty of a rule violation. The plaintiffs were transferred from the John Bennett Correctional Facility, a medium security unit, to the Iowa State Penitentiary, a maximum security unit. On appeal, the disciplinary reports were dismissed because of a procedural error.
The incident, however, gave rise to the complaint at issue. The complaint alleges violations of plaintiffs’ First Amendment rights to freely exercise their religion at both the John Bennett Correctional Center (JBCC) and the Iowa State Penitentiary (ISP).
The district court made preliminary findings that the Muslim religion is a legitimate form of religion protected by the First Amendment, and that the plaintiffs are sincere in their practice of and belief in that religion. No evidence was presented to the contrary and we fully accept these preliminary findings.
*1213The district court then went on to make the following findings and conclusions, relevant to this appeal:
(1) The All-Faiths Chapel at JBCC is sufficient to meet plaintiffs’ prayer needs and it satisfies the requirements of the First Amendment.
(2) JBCC officials have a policy, which is reasonable at that facility, of allowing the Muslim inmates to congregate for prayer five times daily.
(3) ISP officials follow a policy, which is reasonable at that facility, of allowing Muslim inmates to pray five times daily at whatever location they are at when it is time for prayer; they need not be allowed to pray in congregation.
(4) Plaintiffs failed to carry their burden of proof that they were denied, at either JBCC or ISP, the pork-free diet required by their faith.
(5) Plaintiffs failed to carry their burden of proof that they were prohibited, at either JBCC or ISP, from observing a thirty-day religious holiday known as Ramadan, during which they are allowed only one light meal a day.
(6) The disciplinary reports lodged against plaintiffs because of their refusal to leave the coatroom at JBCC despite orders from an officer to do so were dismissed due to procedural errors.
(7) Plaintiffs were not discriminated against because of their religious beliefs.
(8) The prison officials have tried to accommodate the plaintiffs’ religious beliefs whenever possible.
The court was unable to make a specific finding as to whether inmates at JBCC or ISP have been permitted the time and space to hold prayer classes, referred to as Salat. Insufficient evidence was presented on this issue.
In spite of the above findings, the district court ordered the following:
(1) Officials at JBCC must permit the Muslims housed at JBCC to pray in congregation five times daily at the All-Faiths Chapel.
(2) Officials at ISP may not interfere with the five daily prayers of the Muslims wherever such inmates are at the time for prayer.
(3) Officials at ISP must allow Muslims to congregate for prayer once a week, on Fridays.
(4) Officials at JBCC and ISP must provide:
(a) a special diet line completely free of pork which satisfies the inmates’ nutritional needs, or a daily menu which lists the items provided for consumption with their pork content, with the non-pork items, alone, being sufficient to support the inmates’ nutritional and health requirements;
(b) assurance that the pork-free diets are, indeed, totally free of pork in any form.
(5) All references to the incident which occurred on or about November 17, 1980, at JBCC shall be expunged from all records and files of plaintiffs.
(6) Officials at JBCC must permit the Muslims to participate in prayer classes for two hours twice weekly.
In addition, the court ordered that
(7) officials at ISP and JBCC may not prohibit the wearing of prayer caps or prayer robes and the use of rugs by Muslim inmates. The only restrictions allowed on the use of these items are that officials may require verification that an item sought to be worn is a legitimate item of Muslim apparel, officials may search any individual wearing Muslim clothing at any reasonable time, and officials may prohibit the clothing for a reasonable period upon a showing of good cause; and
(8) the assistants to the Muslim religious leader, or Imam, may not be denied access to the Muslim inmates at ISP after the initial five-day period of a prison-wide lockdown. If the lockdown extends beyond five days, the Imam and his assistants must be permitted reasonable visitation. Prison officials may search the parties in the same manner as they search representatives of other faiths.
Several other claims, including all claims for damages, were denied.
*1214A substantial part of the lower court’s order grants injunctive relief in the absence of any finding of constitutional or statutory deprivation. The court finds, for instance, that the prisoners “failed to show any instance in which they were prohibited from praying five times daily at JBCC, with the possible exception of the incident previously described [when the officer on duty made the inmates wait until he could get permission from his superior to allow access to the chapel.] Indeed, the evidence presented by defendants was that the officials at JBCC have a policy of allowing the plaintiffs to pray five times daily.” (Footnote omitted.) In spite of this finding, the court orders injunctive relief such that “officials at JBCC must permit the Muslims housed at JBCC to pray in congregation five times daily at the All-Faiths Chapel.”
An injunction must be tailored to remedy specific harm shown. Aviation Consumer Action Project v. Washburn, 535 F.2d 101, 108 (D.C.Cir.1976); Davis v. Romney, 490 F.2d 1360, 1370 (3d Cir. 1974). In order for an injunction to issue, a right must have been violated. Heasley v. United States, 312 F.2d 641, 648 (8th Cir. 1963). The court must determine that a cognizable danger of future violation exists and that danger must be more than a mere possibility. Connecticut v. Massachusetts, 282 U.S. 660, 674, 51 S.Ct. 286, 291, 75 L.Ed. 602 (1931); Dyer v. Securities and Exchange Commission, 291 F.2d 774, 780-81 (8th Cir. 1961). See generally 11 C. Wright & A. Miller, Federal Practice and Procedure § 2942. “The dramatic and drastic power of injunctive force may be unleashed only against conditions generating a presently existing actual threat; it may not be used simply to eliminate a possibility of a remote future injury, or a future invasion of rights, be those rights protected by statute or by the common law.” Holiday Inns of America, Inc. v. B & B Corporation, 409 F.2d 614, 618 (3d Cir. 1969).
Furthermore, title 42 U.S.C. § 1983, the statute under which this action was brought, requires inter alia that, in order for liability to ensue, a person must be subjected to a “deprivation of .. . rights . . . secured by the Constitution and laws . ...”2 Therefore, in the absence of a clear showing of such a deprivation, there is no predicate for liability or for the relief granted.
As will be more fully discussed later in this opinion, judicial restraint is especially called for in dealing with the complex and intractable problems of prison administration. See, e.g., Procunier v. Martinez, 416 U.S. 396, 404-05, 94 S.Ct. 1800, 1807-1808, 40 L.Ed.2d 224 (1974). It is therefore all the more important that federal courts abstain from- imposing strict standards of conduct, in the form of injunctions, on prison officials in the absence of a concrete showing of a valid claim and constitutionally mandated directives for relief. The courts should not get involved unless either a constitutional violation has already occurred or the threat of such a violation is both real and immediate. Especially in view of the district court’s findings of good faith on the part of the prison officials involved here, the injunction entered by the court would produce too much interference with prison administration and leave too little discretion in the hands of prison officials who must deal with the very difficult issues of security within their institutions.
The district court’s injunction subjects the appellants for an indefinite period of time to the constant threat of contempt proceedings. It would, in our opinion, constitute an unnecessary continuing intrusion into the daily affairs and operation of state prisons. We will not, in the absence of necessity, saddle the prison officials with that burden.
*1215For the foregoing reasons, we reverse the district court’s judgment. The dictates outlined in numbers 1-6, ante at p. 1213, as rendered in the district court’s order, are vacated.
In addition to those parts of the court’s order vacated above, the court ordered that Muslim inmates at JBCC and ISP be. allowed to wear prayer caps and robes even outside their prayer services and that Muslim religious leaders be allowed to visit with Muslim inmates after the initial five-day period of an emergency lockdown. Unlike the other parts of the court’s order, these two directives addressed situations which the court found to be constitutionally lacking. We cannot agree with the court’s findings in this regard, however, and thus we vacate these portions of the court’s order as well.
The court found that plaintiffs have been allowed to wear prayer caps and robes at ISP but have been prohibited from wearing them outside prayer services at JBCC. The court found that, though the prohibition is “a reasonable method of preventing the concealment of contraband,” the officials should adopt a “less restrictive alternative which may be employed with less restriction upon plaintiffs’ First Amendment rights.”
“Inmates retain those First Amendment rights not inconsistent with their status as prisoners or with penological objectives of the corrections system. Pell v. Procunier, 417 U.S. 817, 822, 94 S.Ct. 2800, 2804, 41 L.Ed.2d 495 (1974). Challenges to restrictions on these rights must be analyzed in terms of legitimate policies and goals of the corrections agency. Id. ” Storseth v. Spellman, 654 F.2d 1349, 1355 (9th Cir. 1981). See also, Proffitt v. Ciccone, 506 F.2d 1020, 1021 (8th Cir. 1974); Sharp v. Sigler, 408 F.2d 966, 970 (8th Cir. 1969). While in general we agree with the district court that limitations on these rights should be no greater than necessary to protect the governmental interest involved, Procunier v. Martinez, 416 U.S. 396, 413, 94 S.Ct. 1800, 1811, 40 L.Ed.2d 224 (1974), we believe that, especially when the maintenance of institutional security is at issue, prison officials ordinarily must have wide latitude within which to make appropriate limitations. In this instance, the prison officials have explained the purpose of their policy of prohibiting the wearing of caps and robes outside prayer meetings; they urge that such attire makes it too easy to conceal contraband. We find this explanation eminently reasonable, particularly in view of the fact that operating personnel is limited.
As noted by the Third Circuit in holding that the district court erred in requiring prison officials to select the least restrictive alternative in regard to the problem of escorting segregated inmates to religious services:
[I]t is the informed discretion of the prison administrator that controls, as long as it is reasonably related to a legitimate correctional goal, and not “a court’s idea of how best to operate a detention facility.”
St. Claire v. Cuyler, 634 F.2d 109, 117 (3d Cir. 1980). (citation omitted). Further elucidating the issue of administrative discretion in matters of prison discipline, the St. Claire court held: “The deferential review required by the Supreme Court’s decisions leaves no room for a requirement that prison officials choose the least restrictive regulation consistent with prison discipline.” 634 F.2d at 114.
The district court would allow the wearing of robes and caps at all times but give prison officials the right to search, at any reasonable time, any individual wearing the clothing. However, we think the court in this instance should not substitute its judgment for that of the officials who run penal institutions. Bell v. Wolfish, 441 U.S. 520, 544, 99 S.Ct. 1861, 1876-1877, 60 L.Ed.2d 447 (1979).
Prison authorities . .. may adopt any regulations dealing with the exercise by an inmate of his religion that may be reasonably and substantially justified by considerations of prison discipline and order. So long as the prison authorities provide the inmate with a reasonable opportunity for the exercise of his religious tenets in a form that is substantially war*1216ranted by the requirements of prison safety and order, there is no violation of the inmate’s constitutional rights.
Sweet v. South Carolina Department of Corrections, 529 F.2d 854, 863 (4th Cir. 1975). A wide range of discretion must be allowed the officials to deal with security matters. According to the record before us, the officials involved in this suit have tried in good faith to accommodate the Muslim inmates’ religious beliefs. We must give deference to their judgment in weighing the competing interests here involved. See Bell v. Wolfish, 441 U.S. at 547-48, 99 S.Ct. at 1878-1879. We find that no constitutional right of the prisoners was violated by the prohibition on wearing prayer caps and robes outside religious services. This matter will stay within the discretionary powers of the state prison officials to safeguard institutional security, and the court’s order to the contrary is hereby vacated.
The same reasoning applies to vacate the court’s order that Muslim religious leaders be allowed to visit with inmates during a lockdown. No constitutional right of a prisoner is violated when he is not allowed to see visitors during an emergency lockdown, even if the requested visitor is a religious adviser. See, e.g., White v. Keller, 438 F.Supp. 110 (D.Md.1977), aff’d, 588 F.2d 913 (4th Cir. 1978). Thus, we defer to the prison administrators for the “adoption and execution of policies and practices that in their judgment are needed to preserve internal order and discipline and to maintain institutional security.” Bell v. Wolfish, supra, 441 U.S. at 547, 99 S.Ct. at 1878 (citations omitted).
The injunction issued by the district court is vacated and the case is dismissed.