A New York Petition Under 28 USC 2254 For Writ of Habeas Corpus By Person In State Custody is a legal document used to challenge the legality of a person’s detention in a state prison. The writ of habeas corpus is a court order that requires the government to prove that they have the right to continue to detain an individual. This petition is filed with the State Supreme Court in the county where the person is being held in state custody. The petition must contain the petitioner's name, a detailed statement of facts, and a legal argument, as well as a request for a hearing. If the petition is granted, the court will hold a hearing to determine if the petitioner's detention is lawful. There are three types of New York Petition Under 28 USC 2254 For Writ of Habeas Corpus By Person In State Custody: First, a petition for habeas corpus ad prosequendum, which is used to bring a prisoner to court for a criminal hearing; second, a petition for habeas corpus ad testificandum, which is used to bring a prisoner to court to testify; and third, a petition for habeas corpus de Nova, which is used to challenge the legality of the prisoner’s continued detention.