OPINION
PER CURIAM.Appellant Neville Sylvester Leslie, an immigration detainee at York County Prison in Pennsylvania, filed a petition for writ of habeas corpus pursuant to 28 U.S.C. § 2241 in the United States District Court for the Middle District of Pennsylvania challenging his detention by the United States Department of Homeland Security (DHS). Leslie also raised several issues related to the conditions of his confinement. The District Court dismissed the petition. For the following reasons, we will summarily affirm.
Leslie, a native and citizen of Jamaica, has had lawful permanent resident status since 1989. In 1998, following a guilty plea, Leslie was convicted in the United States District Court for the Eastern District of Virginia of conspiracy to possess and distribute 50 grams or more of crack cocaine in violation of 21 U.S.C. § 846. The Court sentenced Leslie to a term of imprisonment of 168 months. The sentence was later reduced pursuant to a Sentencing Guidelines amendment. See generally United States v. Mateo, 560 F.3d 152, 154 (3d Cir.2009).
Upon completion of his sentence, DHS took Leslie into custody and charged him as being removable for having been convicted of an aggravated felony and a controlled substance offense. 8 U.S.C. §§ 1227(a)(2) (A) (iii) & (a)(2)(B)(i). On April 16, 2008, after a brief hearing at York County Prison, an Immigration Judge (IJ) ordered that Leslie be removed *957from the United States. The Board of Immigration Appeals (BIA) dismissed Leslie’s appeal. Leslie then filed a petition for review in this Court. Leslie v. Att’y Gen., C.A. No. 08-3180. On August 14, 2008, a motions panel of this Court granted his request for a stay of removal and appointed him counsel. The petition for review is currently pending before this Court.
On April 22, 2009, nine months after the BIA issued the final order of removal, Leslie filed an emergency writ of habeas corpus pursuant to 28 U.S.C. § 2241. In the petition, Leslie argued that his continued detention violated the Constitution. Leslie also asserted Eighth Amendment claims related to the conditions of his confinement at York County Prison. The District Court dismissed the petition. Leslie sent the District Court a letter requesting an extension of time to file a motion for reconsideration and for appointment of counsel. The District Court denied the request for counsel, and Leslie filed separate timely notices of appeal challenging the dismissal of his petition and the District Court’s refusal to appoint counsel. Previously, the Clerk consolidated the two resulting appeals. Leslie has also filed two motions in this Court requesting appointment of counsel.
We have jurisdiction over these appeals pursuant to 28 U.S.C. §§ 1291 and 2253(a).1 In reviewing the denial of Leslie’s habeas corpus petition, we exercise plenary review over the District Court’s legal conclusions and apply a clearly erroneous standard to its factual findings. See Cradle v. United States ex rel. Miner, 290 F.3d 536, 538 (3d Cir.2002). We review the District Court’s denial of counsel for an abuse of discretion. See Tabron v. Grace, 6 F.3d 147, 158 (3d Cir.1993).
The District Court analyzed Leslie’s detention under 8 U.S.C. § 1226(c) which instructs the Attorney General to take into custody and detain during ongoing removal proceedings any alien who, like Leslie, is removable by reason of having committed an aggravated felony. In Demore v. Kim, 538 U.S. 510, 123 S.Ct. 1708, 155 L.Ed.2d 724 (2003), the Supreme Court held that mandatory detention of lawful permanent residents during removal proceedings pursuant to § 1226(c) does not violate the protections guaranteed under the Constitution, even when there has been no finding that an alien is unlikely to appear for his or her removal proceedings. See id. at 527-28, 123 S.Ct. 1708. The District Court relied on Demore in refusing to grant habeas relief. Leslie, however, filed the petition after the BIA entered his final order of removal. See 8 C.F.R. § 1241.1(a) (“An order of removal made by the immigration judge at the conclusion of proceedings ... shall become final ... [u]pon dismissal of an appeal by the Board of Immigration Appeals”). At that point, DHS was not detaining Leslie pursuant to § 1226(c) but rather under 8 U.S.C. § 1231(a), which authorizes post-final order detentions and requires the Attorney General to detain him.2 As discussed below, any error by the District Court in this regard is harmless, inasmuch as Leslie’s constitutional challenge to his detention is premature.
*958Under § 1231(a), the Attorney General has 90 days to remove Leslie from the United States after his final order of removal. 8 U.S.C. § 1231(a)(1)(A). The Supreme Court interpreted § 1231(a)(6) to authorize post-removal order detention of an alien convicted of an aggravated felony to a period reasonably necessary to bring about the alien’s removal, generally no more than six months.3 Zadvydas v. Davis, 533 U.S. 678, 700-01, 121 S.Ct. 2491, 150 L.Ed.2d 653 (2001). After six months, “once the alien provides good reason to believe that there is no significant likelihood of removal in the reasonably foreseeable future, the Government must respond with evidence to rebut that showing.” Id. at 701, 121 S.Ct. 2491. “This 6-month presumption, of course, does not mean that every alien not removed must be released after six months.” Id.
The removal period under section 1231 begins on the latest of (1) the date the order of removal becomes administratively final; (2) if the removal order is judicially reviewed and if a court orders a stay of the alien’s removal, the date of the court’s final order; and (3) if the alien is confined (except under an immigration process), the date the alien is released from confinement. 8 U.S.C. § 1231(a)(1)(B). Leslie filed a petition for review and a motions panel of this Court granted him a stay of removal on August 14, 2008. Leslie v. Att’y Gen., C.A. No. 08-3180. Leslie’s case is currently pending before this Court. Inasmuch as the “period reasonably necessary to secure removal” has not yet begun under § 1231(a)(1)(B), Leslie’s argument that his continued detention violates the Constitution is premature. Zadvydas, 533 U.S. at 689, 121 S.Ct. 2491. Therefore, the District Court, did not err in dismissing the petition for habeas corpus.
To the extent that Leslie attempts to challenge the conditions of his confinement, we agree with the District 'Court that this habeas corpus petition was not the proper vehicle to raise his claims. See Doe v. Pa. Bd. of Prob. and Parole, 513 F.3d 95, 99 n. 3 (3d Cir.2008). Further, the District Court did not err in denying Leslie’s request for appointment of counsel. See Tabron, 6 F.3d at 155 (before appointing counsel district court must consider the merits of the plaintiffs claim). Likewise, Leslie’s motions for appointment of counsel in this Court are also denied.
Accordingly, because this appeal presents us with no substantial question, we will summarily affirm the District Court’s order. See 3rd Cir. L.A.R. 27.4 and I.O.P. 10.6.
. The District Court had habeas jurisdiction over Leslie’s claim that his detention was prolonged unlawfully. See, e.g., Nnadika v. Att’y Gen., 484 F.3d 626, 632 (3d Cir.2007).
. The statute provides: "During the removal period, the Attorney General shall detain the alien. Under no circumstances during the removal period shall the Attorney General release an alien who has been found ... de-portable under section 1227(a)(2)....” 8 U.S.C. § 1231(a)(2).
. Section 1231(a)(6) provides: "An alien ordered removed who is ... removable under section 1227(a)(1)(C), 1227(a)(2), or 1227(a)(4) of this title ... may be detained beyond the removal period...." 8 U.S.C. § 1231(a)(6).