The Pennsylvania Petition Under 28 U.S.C. Sec. 2254 for a Writ of Habeas Corpus By a Person In State Custody is a legal document used to challenge the legality of an individual’s incarceration in a Pennsylvania state prison. Habeas corpus, or the Great Writ, is a centuries-old legal process that requires a court to examine the lawfulness of someone’s imprisonment. Under 28 U.S.C. Sec. 2254, a person in state custody can file a petition for a writ of habeas corpus in a federal district court. The two types of Pennsylvania Petition Under 28 U.S.C. Sec. 2254 for a Writ of Habeas Corpus By a Person In State Custody are: (1) a petition for writ of habeas corpus ad prosequendum, which requests that a prisoner be brought into federal court to testify or face criminal charges; and (2) a petition for writ of habeas corpus ad testificandum, which requests that a prisoner be brought into federal court to give testimony in a civil or criminal proceeding. The petition must include information about the prisoner’s criminal history, the grounds for challenging the incarceration, and any other relevant facts. It must be signed by the prisoner or the prisoner’s lawyer and must be submitted to the federal district court where the prisoner is incarcerated. The court will review the petition and, if it finds the prisoner’s claims to be valid, will issue a writ of habeas corpus ordering the state prison to release the prisoner.