concurring in part and dissenting in part.
I concur in the decision to reverse the district court’s award of attorney fees on the ground that the government was substantially justified in defending the constitutionality of § 236(c). However, I would remand the case to the district court for a determination of whether or not attorney *425fees are appropriate under the EAJA. Remand is appropriate because the district court shouid determine whether or not the government was substantially justified in defending § 236(c) as applied to Dvorkin under the specific facts of the case.
At the time he was taken into custody, Dvorkin was a lawful permanent resident of the United States facing the prospect of prolonged pre-hearing detention. The Supreme Court had not yet issued its decision in Demore v. Kim, 538 U.S. 510, 123 S.Ct. 1708, 155 L.Ed.2d 724 (2003), which held that § 236(c) was facially constitutional. However, this Court had not yet issued its decision in Ly v. Hansen, 351 F.3d 263 (6th Cir.2003), which held that even if § 236(c) is constitutional, pre-hearing detention must be reasonable, and that detainees are entitled to seek habeas relief when facing the prospect of prolonged or indefinite pre-hearing detention.
The majority relies on these facts for the proposition that at the time the constitutionality of Dvorkin’s detention was in question, the constitutionality of the statute was far from settled, and therefore the government was substantially justified in defending the facial constitutionality of § 236(c). However, that conclusion does not accurately reflect the issue before the Court. The district court’s decision in this case should be reversed specifically because it based its determination as to EAJA fees only on the justification for the government’s defense of § 236(c) as a whole. Because it based its decision on the defensibility of the statute, the district court did not analyze the government’s justification for its defense of Dvorkin’s detention without bond.
Dvorkin’s petition for writ of habeas corpus challenged the constitutionality of § 236(c) os applied to his detention without the opportunity for bond. The petition did not pose a facial challenge to the constitutionality of § 236(c). The district court held that § 236(c) was facially unconstitutional, but never reached the specific question posed in this appeal, which is: assuming § 236(c) to be facially constitutional, was the government substantially justified in vigorously defending the mandatory detention of Dvorkin for a prolonged and perhaps indefinite period under the authority of the statute?
One of the government’s positions, that § 236(c) is constitutional, was ultimately proven to be justified by the Supreme Court’s decision in Demore. However, the government’s second position, that it could subject Dvorkin to the prospect of indefinite detention, was perhaps never substantially justified, as this Court concluded in Ly. In other words, even if § 236(c) is generally constitutional, the district court may still conclude that its application in this particular case was not substantially justified, and that Dvorkin’s counsel is entitled to EAJA fees.
The remedy chosen by the majority, reversal without remand, produces an anomalous result. Specifically, under the majority’s holding, by successfully challenging the terms of his detention during the early stages of his detention, Dvorkin forfeited counsel’s ability to recover attorney fees under the EAJA. On the other hand, a pre-hearing detainee who waits longer to challenge the terms of their detention may be allowed to recover fees because it would be easier to show that the length of the wrongful detention rendered it unreasonable under Ly. Attorneys for detainees such as Dvorkin would be confronted with the difficulty of choosing to wait longer to file a habeas petition under Demore and Ly, so as to be assured a fee, at the expense of their client remaining in custody-
This problem is magnified by the fact that the average length of pre-hearing de*426tention under § 236(c) is approximately 47 days. In Demore, the Supreme Court observed:
Under § 1226(c), not only does detention have a definite termination point, in the majority of cases it lasts for less than the 90 days we considered presumptively valid in Zadvydas. The Executive Office for Immigration Review has calculated that, in 85% of the cases in which aliens are detained pursuant to § 1226(c), removal proceedings are completed in an average time of 47 days and a median of 30 days. In the remaining 15% of cases, in which the alien appeals the decision of the Immigration Judge to the Board of Immigration Appeals, appeal takes an average of four months, with a median time that is slightly shorter.
Demore, 538 U.S. at 529, 123 S.Ct. 1708 (internal citations omitted).
In this case, Dvorkin was taken into custody on April 3, 2002. Twenty-three days later, on April 26, 2002, he filed his petition for habeas corpus. Fifty-nine days after he was taken into custody, on May 31, 2002, the district court granted his petition. Approximately 62 days after his detention began, on June 5, 2002, Dvorkin was released on bond. Therefore, the length of Dvorkin’s detention appears to have fallen within the “average” range for pre-hearing detainment under § 236(c).
Under the majority’s holding, attorneys for detainees such as Dvorkin, who face potentially wrongful indefinite detention, would never be entitled to EAJA fees. Unless the inquiry as to EAJA fees asks whether or not the government was substantially justified in defending the application of § 236(c) under specific circumstances and as to specific detainees, counsel would never be able to prove that the government was not substantially justified in defending its position. The government would only have to rest on its facial defense of the statute, rather than its application, in order to avoid an EAJA fees award.
In Scarborough v. Principi, 541 U.S. 401, 406, 124 S.Ct. 1856, 158 L.Ed.2d 674 (2004), the Supreme Court described the purposes of the EAJA as follows:
Congress enacted the EAJA to eliminate the barriers that prohibit small businesses and individuals from securing vindication of their rights in civil actions and administrative proceedings brought by or against the Federal Government. [The purpose of the Act is] to diminish the deterrent effect of seeking review of, or defending against, governmental action.
Scarborough, 541 U.S. at 406, 124 S.Ct. 1856 (internal quotation marks and citations omitted).
Under the majority’s holding, the impossibility of obtaining EAJA fees would deter attorneys from taking cases on behalf of individuals whose rights were violated by the Federal Government. This outcome is inconsistent with the purposes of the EAJA.
On remand, the district court should address the anomalous situation created by the timing of the Demore and Ly decisions in relation to this case. Dvorkin, whose detention was lawful under Demore, but potentially unreasonable under Ly, should have the opportunity to convince the district court that he is entitled to EAJA fees.
I agree with the Court’s conclusion that the district court erred by holding that the government’s defense of § 236(c) was not substantially justified. However, I would remand this case to the district court to address the question of whether or not the *427government’s defense § 236(c) as applied to Appellee was substantially justified.