A Maryland Petition for Writ of Habeas Corpus (Under 28 USC 2241) is a legal petition made to a federal court by someone who is being detained or imprisoned in Maryland. The petition is used to challenge the legality of the detention or imprisonment, and to seek relief from the court. The petitioner must argue that the detention or imprisonment is unconstitutional or unlawful in some way. The petitioner could be a state prisoner, a federal prisoner, an inmate of a federal jail or prison, or a person detained by the U.S. Immigration and Customs Enforcement. There are two types of Maryland Petition for Writ of Habeas Corpus (Under 28 USC 2241): the first type is a Petition for a Writ of Habeas Corpus ad Prosequendum, which is used when the petitioner is seeking to be brought before a court for a criminal trial; and the second type is a Petition for a Writ of Habeas Corpus ad Subjiciendum, which is used when the petitioner is seeking to challenge the legality of his or her detention or imprisonment. The petitioner must present a clear and convincing case that the detention or imprisonment is unconstitutional or unlawful. The petitioner must also establish that he or she has exhausted all other available remedies. If the court finds that the petitioner has a valid case, it can issue a Writ of Habeas Corpus, which orders the respondent (usually the warden or jailer) to bring the prisoner before the court to determine the legality of the detention or imprisonment.