Cheikh Diop (plaintiff) was taken into custody by the Department of Homeland Security (DHS) (defendant) after having been twice convicted in Pennsylvania of a crime involving moral turpitude. Thereafter, proceedings to remove Diop from the United States began. Diop was subject to mandatory detention pursuant to § 236(c) of the Immigration and Nationality Act (INA), which did not provide for the possibility of release on bond. Diop was held for nearly three years. During that time, Diop’s case meandered through the administrative and judicial review process, from immigration judges to the Board of Immigration Appeals (BIA) and back and to various courts in Pennsylvania and back. Subsequently, Diop filed a petition for a writ of habeas corpus against U.S. Immigration and Customs Enforcement (ICE), Department of Homeland Security (DHS), and others (collectively the Government) (defendants) in federal district court. The district court denied Diop’s petition. Diop appealed.