Luis Felipe Casas-Castrillon (Casas) (plaintiff), a native and citizen of Colombia, became a legal permanent resident of the United States in 1990. After being released from prison for serving a sentence related to an auto burglary conviction, Casas was served with a notice to appear and detained by the Immigration and Naturalization Service (INS) in 2001 pending proceedings to remove Casas from the United States. An immigration judge ordered Casas to be deported because Casas had committed two criminal offenses involving moral turpitude. The Board of Immigration Appeals (BIA) affirmed the judge’s order. Casas remained in federal custody for nearly seven years while pursuing various forms of relief in the courts and the BIA. Casas did not have an opportunity to argue that his detention was unnecessary because he did not pose a danger to the community or was not a flight risk. Casas filed a petition for writ of habeas corpus under 28 U.S.C. § 2241 in federal district court against the Department of Homeland Security (DHS) (defendant). The district court denied Casas’ petition. Casas appealed.