173 F.3d 609
Andre L. PHILLIPS, Petitioner-Appellant,v.Richard P. SEITER, Respondent-Appellee.Glenn Watson, Petitioner-Appellant,v.Jeffrey J. Clark, Respondent-Appellee.
Nos. 98-2477, 98-3224.
United States Court of Appeals,Seventh Circuit.
Submitted Oct. 29, 1998.Decided April 12, 1999.

Andre L. Phillips (submitted), Greenville, IL, pro se.
Mark R. Niemeyer (submitted), Office of U.S. Attorney, Civil Division, Fairview Heights, IL, for Respondent-Appellee Richard P. Seiter.
Glenn Watson (submitted), Terre Haute, IN, pro se.
Judith A. Stewart (submitted), Office of U.S. Attorney, Indianapolis, IN, for Respondent-Appellee Jeffrey J. Clark.
Before POSNER, Chief Judge, and COFFEY and DIANE P. WOOD, Circuit Judges.
POSNER, Chief Judge.


1
We have consolidated for decision two appeals by federal prisoners whose petitions for habeas corpus, filed under 28 U.S.C. § 2241 in the federal district courts in which they are imprisoned, which are different districts from the ones in which they were sentenced, were dismissed for want of jurisdiction.  With irrelevant exceptions, a federal prisoner who wants to mount a collateral attack on the judgment pursuant to which he is imprisoned must do so by motion under 28 U.S.C. § 2255 (the federal prisoner's habeas corpus substitute) in the district in which the judgment was rendered.  The district courts in these two cases, not being the courts that sentenced these prisoners, were therefore correct that they had no jurisdiction.  This ruling, and the dismissals based on it, leave these prisoners free to file their postconviction petitions in the sentencing district.  A dismissal for want of jurisdiction wipes out the petition, and so its refiling in the proper district is not a second or subsequent petition that under 28 U.S.C. § 2244(b)(2) would require our permission to file.  In re Page, 170 F.3d 659, 661-62 (7th Cir.1999).


2
When a court lacks jurisdiction, the ordinary course is, indeed, to dismiss, just as these two district courts did.  But 28 U.S.C. § 1631, enacted in 1982, provides that a district court that finds it lacks jurisdiction over a case "shall, if it is in the interests of justice, transfer such action ... to any other court in which the action ... could have been brought at the time it was filed."   Since the term "interests of justice" is vague, district courts have a good deal of discretion in deciding whether to transfer a case.  Gunn v. United States Dept. of Agriculture, 118 F.3d 1233, 1240 (8th Cir.1997);  Afifi v. United States Dept. of Interior, 924 F.2d 61, 64 (4th Cir.1991);  Miller v. Hambrick, 905 F.2d 259, 262 (9th Cir.1990).  The court can transfer the case even if not asked to do so by either party.  Rodriguez-Roman v. INS, 98 F.3d 416, 423 n. 9 (9th Cir.1996);  General Atomics v. NRC, 75 F.3d 536, 539-40 (9th Cir.1996).


3
A compelling reason for transfer is that the plaintiff, whose case if transferred is for statute of limitations purposes deemed by section 1631 to have been filed in the transferor court, e.g., Edwards v. INS, 59 F.3d 5, 6 (2d Cir.1995), will be time-barred if his case is dismissed and thus has to be filed anew in the right court.  E.g., ITT Base Services v. Hickson, 155 F.3d 1272, 1276 (11th Cir.1998);  Scherbatskoy v. Halliburton Co., 125 F.3d 288, 292 (5th Cir.1997);  Gunn v. United States Dept. of Agriculture, supra, 118 F.3d at 1240.   For the application of this principle to prisoner cases, see In re Sims, 111 F.3d 45, 47 (6th Cir.1997) (per curiam);  Coleman v. United States, 106 F.3d 339, 341 (10th Cir.1997) (per curiam);  Liriano v. United States, 95 F.3d 119, 122-23 (2d Cir.1996).  The problem is likely to be particularly acute in prisoner cases, since prisoners do not have lawyers and so are apt to miss deadlines and since 28 U.S.C. § 2255 has a one-year statute of limitations.  At the same time, there is no reason to raise false hopes and waste judicial resources by transferring a case that is clearly doomed, for example because the statute of limitations had already run when the case was initially filed.  A court is authorized to consider the consequences of transfer before deciding whether to transfer;  that is implicit in the statute's grant of authority to make such a decision, see Christianson v. Colt Industries Operating Corp., 486 U.S. 800, 818, 108 S.Ct. 2166, 100 L.Ed.2d 811 (1988), and implies in turn that the court can take a peek at the merits, since whether or not the suit has any possible merit bears significantly on whether the court should transfer or dismiss it.  It may seem paradoxical to suggest that a court that lacks jurisdiction over a case can examine the merits of the case.  But the paradox dissolves when we remind ourselves that Congress in 28 U.S.C. § 1631 has conferred jurisdiction on federal district courts to decide whether to transfer or dismiss cases over which they lack jurisdiction to adjudicate fully.  The limited jurisdiction that has been conferred creates a power of limited review of the merits.  If the limited review reveals that the case is a sure loser in the court that has jurisdiction (in the conventional sense) over it, then the court in which it is initially filed--the court that does not have jurisdiction--should dismiss the case rather than waste the time of another court.  Expedition is the byword in administering the new system of postconviction review created by the Antiterrorism and Effective Death Penalty Act of 1996, as we have emphasized in our previous cases, such as O'Connor v. United States, 133 F.3d 548 (7th Cir.1998).


4
The district courts in these cases did not, so far as appears, consider whether to transfer these cases;  and so in the ordinary course we would remand.  But as it is apparent from the appeal papers that both petitions for habeas corpus were untimely when filed, these cases fall within the "sure loser" exception to section 1631.  Phillips filed his petition almost two years, and Watson more than three years, after each conviction had become final.  The statutory deadline is, as we noted, one year, and neither appellant suggests that he fits within any of the four exceptions recognized by the statute.


5
AFFIRMED.

