
856 A.2d 277 (2004)
Larry MEGGETT, Petitioner
v.
PENNSYLVANIA DEPARTMENT OF CORRECTIONS & Pennsylvania Board of Probation and Parole, Respondents.
Commonwealth Court of Pennsylvania.
Submitted on Briefs July 2, 2004.
Decided August 11, 2004.
*278 Larry Meggett, petitioner, pro se.
Nicole L. Adams, Camp Hill, for respondents.
BEFORE: COLINS, President Judge, COHN, Judge, FLAHERTY, Senior Judge.
OPINION BY President Judge COLINS.
Before the Court is the Department of Corrections' preliminary objection in the nature of a demurrer[1] to petitioner Larry Meggett's petition for review in this Court's original jurisdiction.
Meggett was transferred from SCI-Graterford to SCI-Mahanoy in August 2002, and upon his arrival at Mahanoy he was ordered to have his hair cut in compliance with Corrections' policy governing inmate grooming, which limits "Afro styles" to four inches in length. Meggett, a Hebrew Israelite/Nazarite who wears dreadlocks, applied to the Facility Chaplaincy Program Director for a hairstyle exemption based on his religion pursuant to DC-ADM 819, Religious Activities, and the exemption was denied. Thereafter Meggett sought clarification of the grooming policy and its application at SCI-Mahanoy, where according to Meggett, prison administration considers all hairstyles worn by African American inmates to be "Afro styles." Meggett filed a grievance and appealed the denial of the exemption to final review.
Meggett filed a petition for review in this Court's original jurisdiction in which he alleges that Corrections is violating his rights under the state and federal constitutions and state and federal law. More specifically, he avers that DC-ADM 807 violates his due process and equal protection rights because it generally permits male hairstyles that do not fall below the top of the collar, but limits "Afro styles" to four inches and does not define "Afro styles."[2] He avers that Corrections is *279 violating his right to religious freedom under the state and federal constitutions and under the Religious Freedom Restoration Act of 1993[3] by denying him a religious exemption from the four-inch hair length limitation. He seeks a declaration of his rights and an order enjoining Corrections from enforcing its grooming policy against him.
In its demurrer, Corrections avers that Meggett has failed to state a claim in mandamus because he has no established right to maintain his hair longer than permitted by DC-ADM 807, that the policy is constitutional, and that it has no duty to permit Meggett to maintain his hairstyle longer than the four-inch maximum length. In ruling on preliminary objections, we must consider as true all well-pleaded material facts set forth in the petition for review and all reasonable inferences that may be drawn from those facts. Kreamer v. Department of Corrections, 834 A.2d 710 (Pa.Cmwlth.2003). Preliminary objections should be sustained only in cases in which it is clear and free from doubt that the facts pleaded are legally insufficient to establish a right to relief. Werner v. Zazyczny, 545 Pa. 570, 681 A.2d 1331 (1996).

Equal Protection Claim
A prisoner, by the very fact of his or her conviction and incarceration, has diminished civil rights. Wise v. Department of Corrections, 690 A.2d 846 (Pa. Cmwlth.1997). As a general rule, a prison regulation does not violate a prisoner's constitutional rights if it is reasonably related to a legitimate penological interest. Id. Equal protection requires that when a regulation undertakes to define a class of persons to be treated differently that the classification and the difference in treatment be related to the purpose of the regulation. United States v. Virginia, 518 U.S. 515, 116 S.Ct. 2264, 135 L.Ed.2d 735 (1996). The courts have identified varying levels of governmental justification, depending on the nature of the class. Discrimination on the basis of race or national origin is subject to strict scrutiny, while classifications based on economic factors or nonsuspect classes receive rational basis scrutiny. West v. Virginia Department of Corrections, 847 F.Supp. 402 (W.D.Va. 1994).
Although the courts have upheld the constitutionality of prison grooming policies that treat male and female inmates differently based on their being reasonably related to legitimate penological objectives, Wise; Poe v. Werner, 386 F.Supp. 1014 (M.D.Pa.1974), we are unable to determine that Meggett has failed to state an equal protection claim based on Corrections' policy limiting the hair length of African American inmates who wear "Afro styles."

Freedom of Religion Claim
The purpose of the Religious Freedom Restoration Act was to restore the compelling interest test when courts evaluate whether the government has unconstitutionally burdened a person's exercise of religion. 42 U.S.C. § 2000bb(b)(1). However, the U.S. Supreme Court has held that this Act intrudes into the States' traditional prerogatives and general authority to regulate for the health and welfare of its citizens and therefore exceeded congressional authority. City of Boerne v. Flores, 521 U.S. 507, 117 S.Ct. 2157, 138 L.Ed.2d 624 (1997).
In a free exercise of religion claim, the threshold requirements for religious beliefs to be accorded first amendment protection are that the beliefs avowed be 1) sincerely held and 2) religious in nature, *280 in the claimant's scheme of things. Africa v. Pennsylvania, 662 F.2d 1025 (3d Cir. 1981), cert. denied, 456 U.S. 908, 102 S.Ct. 1756, 72 L.Ed.2d 165 (1982). When both of these requirements are met, the court must go on to decide the question of whether a legitimate and reasonably exercised state interest outweighs the proffered first amendment claim. Id. In the present matter Meggett alleges that his sincerely held religious beliefs justify his request for religious exemption from Corrections' grooming policy or accommodation in connection with its policy of limiting the hair length of African American inmates to four inches. We cannot conclude that Meggett has failed to state a claim for violation of his right to religious freedom.
Accordingly, the preliminary objection is overruled.

ORDER
AND NOW, this 11th day of August 2004, the Department of Corrections' preliminary objection in the nature of a demurrer is overruled. The Department of Corrections shall file an answer to the petition for review within 30 days of entry of this order.
NOTES
[1]  The Pennsylvania Board of Probation and Parole was dismissed from this action by order dated March 5, 2004, sustaining its preliminary objection in the nature of a demurrer.
[2]  The policy with respect to male hairstyles states in pertinent part,

A. Hairstyles
1. General
Hairstyles of different types will be permitted provided they do not conflict with the facility's procedures for safety, security, identification, and sanitation efforts.
2. Male Hairstyles
a. Hair that does not fall below the top of the collar in length (Afro styles no longer than four inches) shall be permitted.
[3]  42 U.S.C. §§ 2000bb-2000bb-4.
