
515 N.W.2d 10 (1994)
Sean Eugene BRYSON, Plaintiff,
v.
IOWA DISTRICT COURT, Defendant.
No. 92-1394.
Supreme Court of Iowa.
April 20, 1994.
Philip B. Mears of the Mears Law Office, Iowa City, for plaintiff.
Bonnie J. Campbell, Atty. Gen., and Suzie Berregaard Thomas, Asst. Atty. Gen., for defendant.
Considered by HARRIS, P.J., and LARSON, CARTER, SNELL, and TERNUS, JJ.
*11 PER CURIAM.
Sean Bryson challenges the district court's refusal to overturn a prison disciplinary sanction. The issue presented by this case is whether Bryson's First Amendment rights were violated when he was disciplined for possessing a newspaper clipping about a gang shooting. We conclude his rights were not violated and affirm.
Sean Bryson is an inmate at the Iowa Men's Reformatory (IMR). Bryson received a disciplinary notice charging him with violations of several prison disciplinary rules and alleging he was involved in Vice Lords gang activity within the institution, including planning an assault on another inmate. A search of Bryson's cell revealed letters containing prohibited gang symbols, a photograph of Bryson making a "VL" hand gesture and a newspaper clipping about a gang shooting in Des Moines.
The prison disciplinary committee found Bryson guilty of obstructive/disruptive conduct and unauthorized possession of gang-related materials. He received a disciplinary sanction of fifteen days of solitary confinement, eighty days of level one disciplinary detention and the loss of sixteen days good-conduct time.
Bryson challenged the discipline before the district court in an application for postconviction relief pursuant to Iowa Code chapter 663A (now codified at Iowa Code chapter 822 (1993)). The district court upheld the discipline. It found institutional security requires that gang-related materials be prohibited, and therefore, Bryson's First Amendment rights were not violated when he was disciplined for possessing the newspaper article. Bryson filed a notice of appeal on August 28, 1992.
Bryson attempts to challenge the prison discipline by direct appeal. But, effective July 1, 1992, a party seeking an appeal from a prison disciplinary proceeding must proceed by petition for writ of certiorari. 1992 Iowa Acts ch. 1212, § 38 (now codified at Iowa Code § 822.9 (1993)); see also Giles v. State, 511 N.W.2d 622, 626 (Iowa 1994) (constitutional defect of provision cured by codification). Unlike the applicant in Giles, Bryson did not challenge the constitutionality of the amended statute and, therefore, there is no impediment to its application. See id. at 624-25. The court proceeds, however, as if a petition for writ of certiorari were filed. Iowa R.App.P. 304. We grant the petition.
Certiorari lies when the district court has exceeded its jurisdiction or has acted illegally. Iowa R.Civ.P. 306; Whitlock v. Iowa Dist. Court, 497 N.W.2d 891, 893 (Iowa 1993). "Illegality exists when the findings on which the court has based its conclusions of law do not have substantial evidentiary support or when the court has not applied the proper rule of law." Id. Unless otherwise specially provided by statute, the judgment on certiorari is limited to sustaining the proceedings below, or annulling them wholly or in part, to the extent that they were illegal or in excess of jurisdiction. Iowa R.Civ.P. 316.
Bryson contends that being disciplined for possessing a newspaper clipping about a gang shooting violates his First Amendment association and free speech rights. The State does not deny that Bryson's rights have been impinged. Rather, it argues that the prohibition against possessing gang-related materials, such as the newspaper clipping, is reasonably related to institutional security.
"[W]hen a prison regulation impinges on inmates' constitutional rights, the regulation is valid if it is reasonably related to legitimate penological interests." Turner v. Safley, 482 U.S. 78, 89, 107 S.Ct. 2254, 2261, 96 L.Ed.2d 64, 79 (1987). Several factors are relevant in determining the reasonableness of a regulation: (1) there must be a rational connection between the regulation and the legitimate governmental interest advanced to justify it, id. at 89, 107 S.Ct. at 2262, 96 L.Ed.2d at 79; (2) whether there are alternative means of exercising the right available to inmates, id. at 90, 107 S.Ct. at 2262, 96 L.Ed.2d at 79; (3) whether accommodation of an asserted right will have a significant "ripple effect" on fellow inmates and prison staff, id. at 90, 107 S.Ct. at 2262, 96 L.Ed.2d at 80; and (4) whether there are alternatives to the regulation, id. The district court employed *12 the Turner analysis and concluded that the prohibition against possessing gang-related materials was reasonably related to institutional security.
There can be no doubt that internal institutional security is a legitimate penological interest. Pell v. Procunier, 417 U.S. 817, 823, 94 S.Ct. 2800, 2804, 41 L.Ed.2d 495, 502 (1974) ("central to all other corrections goals is the institutional consideration of internal security within the corrections facilities themselves"). Larry Brimeyer testified that gangs are a security problem at IMR and that gang-related materials are prohibited in order to curtail gang associations and gang activity. The prohibition against possessing gang-related material is logically related to curbing gang activity. The prohibition operates in a neutral fashion in that gang-related materials are distinguished solely on the basis of their potential implications for prison security. See Thornburgh v. Abbott, 490 U.S. 401, 415-16, 109 S.Ct. 1874, 1883, 104 L.Ed.2d 459, 474 (1989). Inmates have other means of communication and association that are not prohibited. See id. at 417-18, 109 S.Ct. at 1884, 104 L.Ed.2d at 476. The likelihood that gang-related material will circulate within the prison if not prohibited raises precisely the kind of "ripple effect" with which the Turner Court was concerned. See Turner, 482 U.S. at 90, 107 S.Ct. at 2262, 96 L.Ed.2d at 80; see also Thornburgh, 490 U.S. at 418, 109 S.Ct. at 1884, 104 L.Ed.2d at 476.
Bryson concedes that disruptive gang activity is a threat to institutional security and can be prohibited. He argues, however, that there is no indication that prohibiting possession of gang-related materials achieves the asserted goal. Courts are to defer to correctional officials' judgments in these matters unless substantial evidence in the record indicates they have exaggerated their response. Turner, 482 U.S. at 86, 107 S.Ct. at 2260, 96 L.Ed.2d at 77 (citing Pell, 417 U.S. at 827, 94 S.Ct. at 2806, 41 L.Ed.2d at 504). There is no substantial evidence in this record that IMR officials have exaggerated their response to their legitimate concerns about gang activity.
The district court did not exceed its jurisdiction or act illegally in upholding the discipline imposed for unauthorized possession of gang-related materials. We have considered Bryson's other contentions and find them to be without merit.
WRIT ANNULLED.
