
    Curtis LONG, Appellant v. Harry WILSON, Superintendent.
    No. 03-2898.
    United States- Court' of Appeals, Third Circuit.
    Argued Oct. 26, 2004.
    Filed Dec. 29, 2004.
    
      Jeremy A. Mercer, (Argued), Kenneth M. Argentieri, Melissa L. Irr, Maureen E. Geary, Kirkpatrick & Lockhart LLP, Pittsburgh, PA, for Appellant.
    Michael Handler, (Argued), Assistant District Attorney for Appeals and Legal Research, Office of the District Attorney of Indiana County; Indiana, PA, for Appel-lee.
    Before SCIRICA, Chief Judge, FISHER and BECKER, Circuit Judges.
   BECKER, Circuit Judge.

Curtis Long appeals from an order of the District Court which denied his petition for a writ of habeas corpus, after concluding that, even though the Commonwealth failed to raise the statute of limitations defense, 28 U.S.C. § 2244(d)(1), in the answer to the petition, it had not waived the defense because it advanced it after the Magistrate Judge sua sponte flagged it in her report. This appeal requires us to decide whether this holding is consistent with Robinson v. Johnson, 313 F.3d 128 (3d Cir.2002), cert. denied, 540 U.S. 826, 124 S.Ct. 48, 157 L.Ed.2d 49 (2003)-a case in which we stressed the importance of early interposition of the defense-at least where the petitioner, as here, is not prejudiced by the delay. We hold that it is, that the Commonwealth did not waive the statute of limitations defense, and that the petition was untimely. We will therefore affirm the order of the District Court denying the petition on that ground.

I. Facts and Procedural History

Long was found guilty by a jury in Indiana County, Pennsylvania, of involuntary manslaughter in violation of 18 Pa. Cons.Stat. Ann. § 2504(a) (West 1998), complicity to commit second degree murder in violation of 18 Pa. Cons.Stat. Ann. § 2502(b), § 306(a)-(c) (West 1998), and complicity to commit robbery in violation of 18 Pa. Cons.Stat. Ann. § 3701(a)(l)(i) (West 2000), § 306(a)-(c) in July 1993. His post-trial motions were denied and he was sentenced to life in prison. The Pennsylvania Superior Court affirmed the judgment, and the state supreme court denied allowance of appeal on March 6, 1995. Long did not petition for certiorari to the United States Supreme Court.

In August 1995 new counsel was appointed under the Pennsylvania Post Conviction Relief Act, 42 Pa. Cons.Stat, Ann. § 9542. et seq. (West 1998), and Long, through .that counsel, filed his first state post-conviction petition on December 27, 1996. It was denied the Superior Court affirmed, and the state supreme court denied allocatur on August 12, 1998. Long filed a state petition for writ of habeas corpus on July 25, 2001. It was denied as an untimely state post-conviction petition, 42 Pa. Cons.Stat. Ann. § 9545(b), and as raising previously litigated claims, 42 Pa. Cons.Stat. Ann. § 9544, on November 29, 2001. Long did not appeal.

Long then filed, pro se, an in forma pauperis petition for writ of habeas corpus pursuant to 28 U.S.C. § 2254 in United States District Court for the Western District of Pennsylvania, raising thirteen grounds for relief. As the merits of Long’s claims are not at issue here we will not provide an exhaustive list. As a general matter, Long alleged that: (1) he was deprived of a fair trial in that his motion for severance was -denied and in that-witnesses were not sequestered; (2) his statement to police was admitted in violation of Miranda v. Arizona, 384 U.S. 436, 86 S.Ct. 1602, 16 L.Ed.2d 694 (1966); (3) he received ineffective assistance of counsel in presenting a coercion defense; (4) the prosecutor committed misconduct in the handling of a key witness; and (5) the police violated his constitutional rights in stopping and arresting him. The assigned Magistrate Judge granted Long in forma pauperis status and ordered the Commonwealth to respond to the habeas petition. The Magistrate Judge’s order stated that the Commonwealth shall address “both the merits of the petition and exhaustion of .state court remedies as required by 28 U.S.C. §§ 2254(b) and (c). Picard v. Connor, 404 U.S. 270, 92 S.Ct. 509, 30 L.Ed.2d 438 (1971); Rose v. Lundy, 455 U.S. 509, 102 S.Ct. 1198, 71 L.Ed.2d 379 (1982); United States ex rel. Trantino v. Hatrack, 563 F.2d 86 (3d Cir.1977); Zicarelli v. Gray, 543 F.2d 466 (3d Cir.1976). The answer shall comply with the requirements of Rule 5 of the Rules Governing Section 2254 Cases in the United States District Courts.” The order, however, made no mention of the habeas corpus statute of limitations, 28 U.S.C. § 2244(d)(1).

On June 11, 2002, the Commonwealth answered the habeas petition, provided a complete state procedural history of Long’s claims, and asserted, citing appropriate authority, that any habeas claim that could fairly be said to have been raised at all levels either on direct appeal or in the first state post-conviction petition was exhausted. Any habeas claim that was raised for the first time in the state habeas/untimely second post-conviction petition or was omitted on appeal to the Superior Court during the original post-conviction proceedings was, ■ of course, barred due to procedural default, and cause and prejudice could not be shown. The Commonwealth then addressed on the merits the severance claim and an ineffective assistance of counsel claim. Although the Commonwealth asserted that the Miranda claim was barred due to a procedural default, it addressed this claim on the merits.

Long filed a reply, in which he urged the court to address his claims notwithstanding his state procedural defaults. Thereafter, there was no activity on the docket until January 2003, when Long’s case was reassigned to a new United States District Judge following the original judge’s retirement. In May 2003, the Magistrate Judge filed a Report and Recommendation, in which she recommended that the habeas petition be denied as'untimely under 28 U.S.C. § 2244(d)(1), which is set forth in the margin, and which provides that a petition be filed within one year of the date on which a judgment becomes final.

In deciding the timeliness issue under 28 U.S.C. § 2244(d), the Magistrate Judge reasoned that Long’s conviction became final 90 days after March 6,1995, when the Pennsylvania Supreme Court denied allo-catur, see 28 U.S.C. § 2244(d)(1)(A); Swartz v. Meyers, 204 F.3d 417, 421 (3d Cir.2000) (judgment becomes final after time for seeking discretionary review expires when discretionary review is. not sought); Kapral v. United States, 166 F.3d 565, 575 (3d Cir.1999) (if defendant does not file certiorari petition, judgment of conviction becomes final when time for seeking certiorari review expires), and thus before the Antiterrorism and Effective Death Penalty Act (“AEDPA”) went into effect on April 24, 1996. Pursuant to Burns v. Morton, 134 F.3d 109, 111 (3d Cir.1998), Long had until April 23, 1997, to file his habeas petition.

Section 2244(d)(2) provides, however, that “[t]he time during which a properly filed application for State post-eonviction or other collateral review with respect to the pertinent judgment or claim is pending shall not be counted toward any period of limitation under this subsection.” 28 U.S.C. § 2244(d)(2). Thus, the statute was tolled when Long filed his first state post-conviction petition on December 27, 1996, started to run again on August 12, 1998, when the state supreme court denied allowance of appeal of that petition, see Stokes v. District Attorney of County of Philadelphia, 247 F.3d 539, 542 (3d Cir. 2001) (time during which state prisoner may file certiorari petition from denial of state post-conviction petition does not toll statute of limitations), and expired well before he filed his federal habeas petition on April 16, 2002. The state habeas petition had no effect on tolling, because an untimely state post-conviction petition is not “properly filed” for purposes of tolling, Merritt v. Blaine, 326 F.3d 157, 165-66 (3d Cir.), cert. denied, 540 U.S. 921, 124 S.Ct. 317, 157 L.Ed.2d 219 (2003), and, in any event, the limitations period had already run when it was filed. In addition, no other statutory exceptions applied, and there was no basis under our decisions in Miller v. New Jersey State Dep’t of Corr., 145 F.3d 616, 618-19 (3d Cir.1998), Fahy v. Horn, 240 F.3d 239, 244-45 (3d Cir.2001), or Johnson v. Hendricks, 314 F.3d 159, 162-63 (3d Cir.2002), cert. denied, 538 U.S. 1022, 123 S.Ct. 1950, 155 L.Ed.2d 865 (2003), for equitable tolling.

The Magistrate Judge then addressed the issue we are required to decide in this appeal. She noted that the Commonwealth had not raised the statute of limitations as an affirmative defense, which presented the question whether the defense was waived under our decision in Robinson v. Johnson, 313 F.3d 128. Relying on Acosta v. Artuz, 221 F.3d 117, 123 (2d Cir.2000), she concluded that a federal magistrate judge could raise the habeas corpus statute of limitations issue sua sponte because it implicated values “beyond the concerns of the parties.” She cited a footnote in our decision in Banks v. Horn, 271 F.3d 527, 533 n. 4 (3d Cir.2001), rev’d on other grounds, 536 U.S. 266, 122 S.Ct. 2147, 153 L.Ed.2d 301 (2002), which predates Robinson, wherein we noted, in reliance upon Acosta, among other cases, that a court of appeals could review the AEDPA statute of limitations issue sua sponte evén if it were not properly before the court. She further observed that we stressed in Robinson that there,is more than one reason why affirmative defenses should be raised as early as is practicáble, and one of them is to promote judicial economy, to which she clearly believed she was contributing.

Long, who was not represented by counsel in the District Court, timely filed objections, in which he argued that the court should apply the miscarriage of justice exception to the AEDPA statute of limitations; in his case the putative miscarriage of justice was a fundamentally unfair trial. Importantly for our- purposes here, the Commonwealth filed an answer to the objections a week later (and within three weeks of the filing of the Report and Recommendation) in which it endorsed the Magistrate Judge’s view that the habeas petition was untimely, stating: “[The Magistrate Judge] determined that the Petition was barred by the one-year statute of limitation provided under 28 U.S.C. § 2244(d). Respondents submit that [the Magistrate Judge] was correct for the reasons set forth in the following paragraphs.” Respondent’s Answer to Petitioner’s Objections to the Magistrate Judge’s Report and Recommendation, at ¶ 2. The Commonwealth also expressed its agreement with the Magistrate Judge’s analysis as it related to calculating when the habeas petition should have been filed, id. at ¶¶ 3-6, and then asked the District Court in the final unnumbered paragraph of this answer to dismiss the petition as untimely, stating: “Wherefore, Respondents respectfully request your Honorable Court to overrule Petitioner’s Objections and to adopt [the Magistrate Judge’s] Report and Recommendation.”

The District Court did just that. In a Memorandum Order entered on June 4, 2003, the District Court denied the habeas petition as untimely and adopted the Report and Recommendation as the Opinion of the Court. The court stated:

The magistrate judge’s report and recommendation, filed May 12, 2003, recommended that the Petition be denied as untimely and that a certificate of appeal-ability be denied. Petitioner has filed objections to the report and recommendation in which he asserts that he has demonstrated cause for his procedural default and prejudice therefrom.... The magistrate judge recommended that the petition be dismissed because it was not timely filed within the one-year limitations period provided for under the Antiterrorism and Effective Death Penalty Act of 1996 (AEDPA), 28 U.S.C. § 2244(d). The magistrate judge did not find any procedural default so the “cause and prejudice” standard does not apply to this case.... In her report and recommendation the magistrate judge discussed the doctrine of equitable tolling which can toll the running of the AEDPA statute of limitations, and properly determined that petitioner has not shown a basis for tolling. After de novo review of the pleadings and documents in the case, together with the objections to [the] report and recommendation ... IT IS HEREBY ORDERED that the Petition be denied as untimely.

Memorandum Order of the District Court, at 1-3 (citation omitted).

Long appealed, and we appointed counsel and granted a certificate of appealability as follows:

[W]hether the respondent to a habeas petition must raise the statute of limitations defense, 28 U.S.C. § 2244(d), in the answer to the habeas petition or be deemed to have waived it. Robinson v. Johnson, 313 F.3d 128 (3d Cir.2002). Put another way, may the Magistrate Judge in a Report and Recommendation recommend dismissal on the basis of untimeliness when the respondent has failed to raise the defense in its answer, id., and may the state thereafter raise the statute of limitations defense in a supplemental pleading to avoid being deemed to have waived the defense, [and] whether the respondent here may be deemed to have raised the statute of limitations defense in its Answer to Petitioner’s Objections to the Magistrate Judge’s Report and Recommendation.

Order of Court (Feb. 20, 2004).

We have jurisdiction pursuant to 28 U.S.C. § 1291. The District Court’s analysis of the statute of limitations issue, which in Long’s case does not involve disputed facts, is subject to plenary review, see Swartz v. Meyers, 204 F.3d at 419, except to the extent that the District Court impliedly permitted the Commonwealth to amend its answer. That decision is reviewed for an abuse of discretion. See Heyl & Patterson Int’l, Inc. v. F.D. Rich Housing of Virgin Islands, Inc., 663 F.2d 419, 425 (3d Cir.1981).

II. The Amendment to the Answer

A. Robinson v. Johnson

Our discussion must necessarily begin with Robinson v. Johnson, supra. Robinson, whose first federal habeas petition was dismissed for failure to exhaust state remedies, filed a second federal habeas petition, which was referred to a magistrate judge who ordered a responsive pleading. The Commonwealth filed a letter response, arguing that the petition should be transferred to the court of appeals for authorization because it was a successive petition. 313 F.3d at 132. The magistrate judge recommended denying the petition on that basis, and the district court accepted the magistrate judge’s recommendation.

Robinson appealed, and we ordered the Commonwealth to show cause why the order dismissing the petition should not be summarily reversed in light of Christy v. Horn, 115 F.3d 201, 208 (3d Cir.1997) (where federal habeas petition has been dismissed without prejudice for failure to exhaust state remedies, petitioner need not apply to court of appeals for authorization to file a second habeas action.) The Commonwealth filed a letter brief, in which it conceded that Robinson’s second federal habeas petition was not successive. The Commonwealth did not present any alternative legal grounds for affirming the district court. We then summarily reversed and remanded.

On remand, Robinson filed a motion to strike his original petition and for permission to file an amended petition. The Commonwealth then filed a pleading, asserting for the first time that Robinson’s second federal habeas petition was time-barred by AEDPA’s statute of limitations, 28 U.S.C. § 2244(d)(1). Robinson, in rebuttal, argued that the Commonwealth’s statute of limitations defense was untimely. The magistrate judge endorsed the Commonwealth’s argument, and the district court adopted the magistrate judge’s Report and Recommendation over Robinson’s renewed objection that the Commonwealth had waived its limitations defense.

On appeal, we held first that, because the statute of limitations is not jurisdictional in nature, see Miller v. New Jersey State Dep’t of Corr., 145 F.3d at 617-18, the state may waive the defense. Robinson, 313 F.3d at 134. Because the Federal Rules of Civil Procedure are applicable to habeas petitions to the extent that they are not inconsistent with the habeas rules, we then considered whether Federal Rule of Civil Procedure 8(c) requires that a defendant plead an affirmative defense, such as a statute of limitations, in its answer. Robinson, 313 F.3d at 134.. We explained: “Parties are generally required to assert affirmative defenses early in litigation, so they may be ruled upon, prejudice may be avoided, and judicial resources may be conserved. Habeas proceedings are no exception.” . Id. We further emphasized: “The purpose of requiring the defendant to plead available affirmative defenses in his answer is to avoid surprise and undue prejudice by providing the plaintiff with, notice and the opportunity to demonstrate why the affirmative defense should not succeed.” Id. at 134-35 (citing Blonder-Tongue Labs., Inc. v. Univ. of Ill. Found., 402 U.S. 313, 350, 91 S.Ct. 1434, 28 L.Ed.2d 788 (1971)).

Nevertheless, we expressly held that “a limitations defense does not necessarily have to be raised in the answer.” Id. at 135. We surveyed several cases involving Federal Rule of Civil Procedure 15(a) and amendments' to answers. In Venters v. City of Delphi, 123 F.3d 956, 967-69 (7th Cir.1997), for example, the Seventh Circuit held that the defendant had waived the statute of limitations defense, and that the district court had abused its discretion in permitting an amendment to the answer. The court explained that, if the relevance of a statute of limitations defense becomes apparent only after discovery» the defendant should promptly seek leave of court to amend the answer and a district court should grant the motion, but that the district court should not countenance an eleventh-hour invocation of the defense, and that raising the statute of limitations for the first time in a reply memorandum in support of' a motion for summary judgment was an impermissible eleventh-hour invocation. The parties had completed an exhaustive discovery process, trial was a month away, and the plaintiff had been denied the opportunity to file a surreply.

After discussing Venters and other cases, the panel explained that all of the cases surveyed reflected “attempts by the courts to keep the consideration of affirmative defenses consistent with at least the purpose, if not necessarily the language, of.Rule 8(c).” Robinson, 313 F.3d at 137. Thus, although an affirmative defense need not be raised in the answer, it must be raised “as early as practicable” thereafter. Id. We reasoned that affirmative defenses must be raised as early as is practicable, not only to avoid prejudice to a plaintiff or petitioner, but also to promote judicial economy. We wrote: “If a party has a successful affirmative defense, raising that defense as early as possible, and permitting a court to rule on it, may terminate the proceedings at that point without wasting precious legal and judicial resources.” Id. We then stated that affirmative defenses under AEDPA should be treated the same as affirmative defenses in other contexts, and, “if not pleaded in the answer, they must be raised at the earliest practicable moment thereafter.” Id.

Applying this rule, we went on to hold that the Commonwealth’s assertion of its affirmative defense of the statute of limitations was not untimely. We opined that the Commonwealth’s letter response to Robinson’s habeas petition seeking transfer to the court of appeals was equivalent to a motion to dismiss for lack of subject matter jurisdiction. A motion to dismiss for lack of subject matter jurisdiction is a favored defense, id. at 139 (citing Fed. R.Civ.P. 12(h)), and we opined that: (1) the Commonwealth did not have to include the statute of limitations defense in its original motion to transfer, and was not required to raise the defense when the case was on appeal for the first time, id. at 139-40; and (2) the normal rules regarding the waiver of defenses under Fed. R.Civ.P. 8(e) did not apply until the threshold issue of successiveness was resolved. We then stated that the defense was not waived because the Commonwealth raised it in its first pleading on remand. Id. at 141.

This reference to the “first” pleading on remand was descriptive of the procedural circumstances of Robinson’s case, i.e., a construction of our holding that the AED-PA statute of limitations defense should, if not pleaded in the answer, be raised at the earliest practicable, or possible, or feasible, moment thereafter. Robinson, 313 F.3d at 137. What the earliest practicable or possible or feasible moment after an answer has been filed might be in another case where the procedural circumstances were different we necessarily left open.

B. Federal Rule of Civil Procedure 15(a): Prejudice and the Role of Delay and Inadvertence

We turn to Long’s arguments on appeal. Long concedes that Robinson does not impose an absolute requirement that the AEDPA statute of limitations defense be asserted in the answer. However, he argues that he suffered undue prejudice as a result of the delay in raising the defense, and that the Commonwealth should have a compelling reason for failing to assert the defense in the answer. Long argues that Robinson was not meant to grant extra time to those litigants who fail to assert the defense in the answer as a result of inadvertence.

Long relies on a decision from the Second Circuit, Strauss v. Douglas Aircraft Co., 404 F.2d 1152, 1156-57 (2d Cir.1968), which we cited in Robinson, 313 F.3d at 136. In Strauss, the district court granted the defendant leave to amend the answer to plead the statute of limitations defense. On appeal the court reversed, holding that, since the complaint had apprised the defendant of an implied warranty claim, and since the defendant from prior experience should have been aware of the choice of forum issue inherent in the case, the limitations defense should have been raised in the original answer, or at a minimum, within a reasonable time thereafter. The court found that the defendant’s conduct in raising the defense four years late was inexcusable, and that the plaintiff was substantially prejudiced in that, had the statute been timely pleaded, he might have been able to bring another action in a jurisdiction where his suit would not have been time-barred.

We do not doubt that Strauss correctly states the law, but it provides only general support for Long’s argument. First, it does not hold that inadvertence on the part of a defendant establishes undue prejudice sufficient to deny an amendment under Rule 15(a). Second, the length of the delay in Straiiss was extremely long. Third, and perhaps most important of all, the plaintiff suffered actual prejudice in that his action might not have been time-barred in another jurisdiction had he known about the statute of limitations defense sooner. With respect to the latter basis for Strauss’ s holding, we note that Long’s habeas petition unquestionably was untimely under 28 U.S.C. § 2244(d). Thus he suffered no prejudice of the type discussed in Strauss. The frustrated expectation of not having an untimely habeas petition heard on the merits does not establish prejudice sufficient to defeat an amendment to an answer.

The delay here presents a closer question. As Long points out, the Commonwealth took 14 months to assert the defense. Long filed his habeas petition in April 2002, and the Commonwealth did not raise the statute of limitations defense until June 2003. The passage of time factors into the analysis of whether a plaintiff has suffered prejudice by a delay in amending an answer to assert an affirmative defense. See Robinson, 313 F.3d at 136 (citing Venters, 123 F.3d at 968-69; Strauss, 404 F.2d at 1155-56; Hayden v. Ford Motor Co., 497 F.2d 1292, 1295 (6th Cir.1974); and Int’l Bhd. of Boilermakers, Local 1603 v. Transue & Williams Corp., 879 F.2d 1388, 1396 n. 3 (6th Cir.1989)). We conclude, however, that the Commonwealth cannot fairly be said to have unduly delayed in raising the AEDPA statute of limitations defense.

The Commonwealth answered the complaint one month after being ordered to do so, and raised the statute of limitations defense one week after Long filed his objections and three weeks after the Magistrate Judge filed her Report and Recommendation. The inactivity on the docket from July 2002 until January 2003 when a new District Judge was assigned, and again from January 2003 until May 2003 when the Magistrate Judge filed her Report and Recommendation, is not attributable to the Commonwealth .under the circumstances; indeed, in a case referred to a magistrate judge, once a habeas petition is filed and answered, it seems reasonable for the parties to wait for a Report and Recommendation to be filed before engaging in further pleading. With respect to the question of inadvertence, the Commonwealth concedes in its brief on appeal that it made a mistake in not raising the defense in the answer.- It argues, however, that it in effect made a timely and proper amendment of its answer in accordance with Federal Rule of Procedure 15(a), and that the District Court, in effect, allowed the amendment in its discretion. We agree.

The Commonwealth relies on Block v. First Blood Associates, 988 F.2d 344 (2d Cir.1993), also from the Second Circuit, where the defendants first raised a statute of limitations defense in a motion for summary judgment four years after the complaint was filed. The district court treated the motion for summary;judgment as a motion to amend the pleadings and dismissed the action as time-barred. On appeal the Second Circuit affirmed, holding that there was no showing of prejudice to the plaintiff and no bad faith on the part of the defendant. The court noted in particular the complete absence of bad faith and the fact that the suit “was untimely on the day it was commenced.” Id. at 351. The court rejected the plaintiffs argument that his frustrated expectations constituted undue prejudice sufficient to overcome the Rule 15(a) right to amend a pleading. Id.

Block elaborates a standard for judging prejudice that is compatible with Robinson, 313 F.3d at 136-37, and Rule 15(a) jurisprudence in this Circuit. The Second Circuit reasoned that, generally, the longer the unexplained delay, the less the plaintiff must show in terms of prejudice. 988 F.2d at 350 (citing Advocat v. Nexus Indus., Inc., 497 F.Supp. 328, 331 (D.Del.1980)). In determining what constitutes prejudice, the Second Circuit considers “whether the assertion of the new claim would: (i) require the opponent to expend significant additional resources to conduct discovery and prepare for trial; (ii) significantly delay the resolution of the dispute; or (iii) prevent the plaintiff from bringing a timely action in another jurisdiction.” Id. (internal quotations and citations omitted). The court also emphasized the absence of bad faith. We endorse the Second Circuit approach. None of these considerations are present in Long’s case. He was not forced to undertake discovery or additional discovery, and he could not have brought his habeas action in another jurisdiction. Moreover, the Commonwealth’s amendment did not delay resolution of the case and was not the product of bad faith.

Rule 15(a) requires that leave to amend the pleadings be granted freely “when justice so requires.” Fed. R. Civ. Pro. 15(a). We have held that motions to amend pleadings should be liberally granted. See, e.g., Adams v. Gould Inc., 739 F.2d 858, 867-68 (3d Cir.1984) (“[Ujnder the liberal pleading philosophy of the federal rules as incorporated in Rule 15(a), an amendment should be allowed whenever there has not been undue delay, bad faith on the part of the [movant], or prejudice to the [nonmovant] as a result of the delay.”). In Lundy v. Adamar of New Jersey, Inc., 34 F.3d 1173 (3d Cir.1994), we stated: “This Court has often held that, absent undue or substantial prejudice, an amendment should be allowed under Rule 15(a) unless ‘denial [can] be grounded in bad faith or dilatory motive, truly undue or unexplained delay, repeated failure to cure deficiency by amendments previously allowed or futility of amendment.’ ” Id. at 1196 (quoting Bechtel v. Robinson, 886 F.2d 644, 652-53 (3d Cir.1989) (emphasis in original)). The plain terms of Rule 15(a) do not discriminate on the basis of type of pleading. The liberal right to amend extends to an answer to the complaint. Heyl & Patterson Int’l, Inc. v. F.D. Rich Housing of Virgin Islands, Inc., 663 F.2d at 425. In Heyl, the plaintiff filed a breach of contract action and the government, in an amended answer, pleaded one specific type of illegality as an affirmative defense. The government’s pretrial statement contained an assertion of the same specific illegality defense. In its opening statement at trial, however, the government asserted three additional specific illegality defenses. Judgment was entered in its favor. On appeal the plaintiff argued that the government had waived the three additional illegality defenses, and that the district court improperly treated the government’s opening statement at trial as an implied amendment to the answer. We disagreed, holding first that, although “procedure[s] for obtaining leave to amend pleadings set forth in Rule 8 of the Fed. R.Civ.P. should generally be heeded, ... rigid adherence to formalities and technicalities must give way before the policies underlying Rule 15.” Id. at 426. Moreover, we did not believe that the government had to supply a compelling reason for its delay in asserting'the three additional defenses in view of the absence of prejudice to the plaintiff. Id. at 426-27.

We believe that Heyl is instructive here for its treatment of the question of delay as it relates to the larger issue of prejudice, and for its rejection of the argument that a respondent or defendant must supply a compelling reason for the delay even if there is no prejudice. Such a rule, if adopted, would certainly run counter to the well-established rule that amendments should be liberally allowed. Heyl also is instructive for what it teaches about flexibility and the formalities of Rule 15(a), both with respect to how an amendment is advanced by a respondent or defendant, and with respect to how it is given effect by a court. Consistent with Heyl, we agree that, although the Commonwealth did not rigidly adhere to the formalities of ■seeking leave to amend, it in effect made a timely and proper amendment of its answer. In addition, the District Court, although it did not expressly state that it was allowing the answer to be amended, in effect, allowed the amendment in its discretion by disposing of the petition on the basis of untimeliness under 28 U.S.C. § 2244(d).

C. Summary

Robinson, 313 F.3d at 136-37, the Rule 15(a) cases discussed therein, and our Rule 15(a) jurisprudence, see, e.g., Heyl, 663 F.2d at 426-27, counsel that, whether a habeas petitioner has been prejudiced by the assertion of the AEDPA statute of limitations defense after an answer has been filed is the ultimate issue, and that prejudice turns on such factors as how late in the proceedings the defense was raised, whether the petitioner had an opportunity to respond, and whether the respondent acted in bad faith. See also Adams, 739 F.2d at 867-68; Lundy, 34 F.3d at 1196. Delay is related to prejudice but was not a problem here, and inadvertence does not equal bad faith. We hold that the Commonwealth timely raised the habeas corpus statute of limitations defense, 28 U.S.C. § 2244(d), by expressly endorsing the Magistrate Judge’s analysis of the timeliness issue, and that Long was not prejudiced thereby. The District Court impliedly approved of the Commonwealth’s “amendment” to the answer by denying the petition as untimely, and did not abuse its discretion in doing so.

III. The Sua Sponte Flagging of the Statute of Limitations Issue by the Magistrate-Judge

The question that remains is the effect of the Magistrate Judge’s flagging of the statute of limitations defense once an answer had been filed, and of the Commonwealth’s response thereto. Our answer to that question was foreshadowed by Banks v. Horn, 271 F.3d 527, a death penalty case which touched preliminarily on the AEDPA statute of limitations before reaching the merits of the petitioner’s ha-beas claims. In the footnote cited by the Magistrate Judge, we expressed the view that a court of appeals could address the AEDPA statute of limitations defense sua sponte even if the habeas respondent had waived the issue on appeal. We wrote:

■Even if not raised, we believe we could consider this issue sua sponte. “While ordinarily we do not take note of errors not called to the attention of the Court of Appeals nor properly raised here, that rule is not without exception. The Court- has ‘the power to notice a “plain error” though it is not assigned or specified,’ .... ‘In exceptional circumstances, especially in criminal cases, appellate courts, in the public interest, may, of their own motion, notice errors to which no exception has been taken, if the errors are obvious, or if they otherwise seriously affect the fairness, integrity or public reputation of judicial proceedings.’ ” Silber [v. United States ], 370 U.S. [717,] 717-18, 82 S.Ct. 1287, 8 L.Ed.2d 798 [ (1962) ] (internal citations omitted). See also Acosta v. Artuz, 221 F.3d 117 (2d Cir.2000); Kiser v. Johnson, 163 F.3d 326 (5th Cir.1999).

Id. at 533 n. 4.

The Commonwealth had argued unsuccessfully in the district court that Bank’s federal habeas petition was untimely. Id. at 532. On appeal Banks argued that the timeliness of his habeas petition was not before us because the Commonwealth had not challenged the district court’s ruling in its counterstatement of issues, and had failed to discuss the issue in its brief except for a conclusory reference to its position in a footnote. We disagreed, believing that we should examine the issue “in light of the District Court’s careful analysis of this issue and its importance, and because the government did make reference to the issue albeit in a footnote.” Id. at 533. The footnote quoted above followed. We then went on to hold that the District Court appropriately applied equitable principles to toll the one-year AEDPA statute of limitations requirement. Id. at 534.

Thus we observed prior to Robinson that the AEDPA statute of limitations is an important issue, the raising of which may not necessarily be left completely to the state. The Banks footnote refers to public interest policies underlying the AEDPA statute of limitations, in terms and by its reliance on Acosta v. Artuz, 221 F.3d 117, a decision also cited by the Magistrate Judge in this case. In Artuz, where a responsive pleading had not yet been filed, the Second Circuit held that, even though the statute of limitations is an affirmative defense, a district court on its own motion may raise the time bar, because AEDPA’s statute of limitations “implicates values beyond the concerns of the parties” having to do with the finality of convictions. 221 F.2d at 123. The court explained:

The AEDPA statute of limitation promotes judicial efficiency and conservation of judicial resources, safeguards the accuracy of state court judgments by requiring resolution of constitutional questions while the record is fresh, and lends finality to state court judgments within a reasonable time. Like the other procedural bars to habeas review of state court judgments, the statute of limitation implicates the interests of both the federal and state courts, as well as the interests of society, and therefore it is not inappropriate for the court, on its own motion, to invoke the doctrine.

Id. (internal quotations and citations omitted). We agree. While civil in nature, habeas corpus eases are different from ordinary civil cases where only the interests of the parties are involved.

In Artuz, the Second Circuit reasoned that the authority of a district judge to raise procedural defenses sua sponte is consistent with Rule 4 of the rules governing habeas corpus, which gives the district court the power to review and dismiss habeas petitions prior to any responsive pleading by the state. Id. Artuz correctly states the law, see also Hill v. Braxton, 277 F.3d 701, 706 (4th Cir.2002); Herbst v. Cook, 260 F.3d 1039, 1042 & n. 3 (9th Cir.2001); Kiser, 163 F.3d 326, 328-29 (5th Cir.1999), and is instructive, but it is not necessarily dispositive here because a responsive pleading was filed by the Commonwealth which omitted the statute of limitations defense. The issue in Long’s case is whether the court can alert the respondent to the defense, and whether the answer can be amended consistent with Rule 15(a) and Robinson, 313 F.3d at 136-37.

We think it plain that a federal magistrate judge may raise the AEDPA statute of limitations issue in a Report and Recommendation after an answer has been filed. In Granberry v. Greer, 481 U.S. 129, 134-35, 107 S.Ct. 1671, 95 L.Ed.2d 119 (1987), the Supreme Court held that a court has the discretion, in the interests of comity and federalism, to decide whether justice would be better served by insisting that a claim be fully exhausted or by rejecting it if it is plainly lacking in merit. It is now widely recognized that judges have discretion to raise procedural issues in ha-beas cases. See, e.g., Sweger v. Chesney, 294 F.3d 506, 520-21 (3d Cir.2002) (whether claim is barred due to procedural default may be considered sua sponte), cert. denied, 538 U.S. 1002, 123 S.Ct. 1902, 155 L.Ed.2d 830 (2003); Smith v. Horn, 120 F.3d 400, 407 (3d Cir.1997) (discretion to consider exhaustion question afforded by Granberry). For one thing, judicial economy is promoted when a magistrate judge identifies the issue early in the course of a case. The limitations issue here was flagged by the Magistrate Judge as part of the preliminary consideration of the matter. See 28 U.S.C. § 636(b)(1).

Most importantly, however, raising procedural habeas issues furthers the interests of. comity and federalism. See Sweger, 294 F.3d at 521; Artuz, 221 F.3d at 123- We have stated that, because these concerns are so important, it is not exclusively up to the parties to decide whether habeas procedural issues should be raised or waived. See, e.g., Szuchon v. Lehman, 273 F.3d 299, 321 n. 13 (3d Cir.2001). Because we see no difference between the habeas corpus statute of limitations and other habeas procedural issues, we hold that our decision in Robinson, 313 F.3d 128, does not prevent a magistrate judge from raising the AEDPA statute of limitations defense sua sponte even after an answer has been filed.

There are decisions contra. The Sixth Circuit has held in a 2-1 decision that the state waived the statute of limitations defense by failing to raise it in the answer. Scott v. Collins, 286 F.3d 923 (6th Cir. 2002). The court reasoned that a district court’s power to sua sponte raise the AEDPA statute of limitations is limited to habeas Rule 4, and that habeas Rule 4 applies only before a responsive pleading is filed. Therefore, the court’s actions amounted to an impermissible curing of the respondent’s waiver. Id. at 929-30. The Ninth Circuit recently joined the Sixth Circuit in Nardi v. Stewart, 354 F.3d 1134 (9th Cir.2004). The court agreed that a district court’s authority to raise the.defense sua sponte evaporates once a responsive pleading is filed. Id. at 1141-42.

The Scott and Nardi decisions are at odds with Robinson and our Rule 15(a) jurisprudence, which do not require that affirmative defenses be pled in the first responsive pleading. Moreover, we believe the dissenting opinion in Scott, 286 F.3d at 931-34 (Stafford, J., dissenting), places the necessary emphasis on the policies underlying AEDPA, and a court’s authority, in its discretion, to raise procedural habeas issues. Noting that the respondent’s failure to raise the defense was inadvertent, and that the petitioner was given an opportunity to respond to the limitations issue, the Scott dissent emphasizes, as we do here today, that: “Congress intended AEDPA to further the principles of comity, finality, and federalism.” 286 F.3d at 932 (citing Williams v. Taylor, 529 U.S. 420, 436, 120 S.Ct. 1479, 146 L.Ed.2d 435 (2000)). “Consistent with such purpose, Congress created a one-year limitations period that was meant to streamline the habeas review process and to lend finality to state court convictions.” Id. at 933 (citing Duncan v. Walker, 533 U.S. 167, 179, 121 S.Ct. 2120, 150 L.Ed.2d 251 (2001)). In Duncan, the Supreme Court explained: “This provision reduces the potential for delay on the road to finality by restricting the time that a prospective federal habeas petitioner has in which to seek federal habeas review.” 533 U.S. at 179, 121 S.Ct. 2120. In our view, AEDPA’s statute of limitations advances the same concerns as those advanced by the doctrines of exhaustion and procedural default, and must be treated the same. Scott, 286 F.3d at 934 (Stafford, J., dissenting). See also Banks, 271 F.3d at 533 n. 4.

IV. Conclusion

In sum, we hold that, consistent with Robinson v. Johnson, 313 F.3d 128, and our Rule 15(a) jurisprudence, see, e.g., Heyl, 663 F.2d at 426-27, the Commonwealth timely raised the habeas corpus statute of limitations defense, 28 U.S.C. § 2244(d), and that Long was not prejudiced by what amounted to an amendment to the Commonwealth’s answer. The District Court impliedly granted leave to amend in a proper exercise of its discretion by denying the petition as untimely. Having in mind that AEDPA’s statute of limitations, like other procedural habeas issues, furthers the principles of comity, finality, and federalism, see Williams, 529 U.S. at 436, 120 S.Ct. 1479, we hold further that a federal magistrate judge may, consistent with Robinson v. Johnson, 313 F.3d 128, raise sua sponte the AEDPA statute of limitations defense even after an answer has been filed, see Granberry, 481 U.S. at 134-35, 107 S.Ct. 1671. The order of the District Court denying the habeas petition as untimely will be affirmed. 
      
      . Habeas Rule 5 provided in pertinent part only that the answer shall state “whether the petitioner has exhausted his state remedies. ...”
     
      
      . Thus the Commonwealth complied with the Magistrate Judge’s order that it should address both exhaustion and the merits.
     
      
      .The habeas corpus statute of limitations provides as follows: (d)(1) A 1-year period of limitation shall apply to an application for a , writ of habeas corpus by a person in custody pursuant to the judgment of a State court. The limitation period shall run from the latest of-
      
        (A) the date on which the judgment became final by the conclusion of direct review or the expiration of the time for seeking such review;
      (B) the date on which the impediment to filing an application created by State action in violation of the Constitution or laws of the United States is removed, if the applicant was prevented from filing by such State action;
      (C) the date on which the constitutional right asserted was initially recognized by the Supreme Court, if the right has been newly recognized by the Supreme Court and made retroactively applicable to cases on collateral review; or
      (D) the date on which the factual predicate of the claim or claims presented could have been discovered through the exercise of due diligence.
      28 U.S.C. § 2244(d) (West Supp.2004).
     
      
      . Bums held that, where a judgment became final on or before April 24, 1996, the effective date of AEDPA, the petitioner had until April 23, 1997, to file a federal habeas corpus petition challenging his conviction. As noted above, Long's judgment became final prior to April 24, 1996.
     
      
      . The Magistrate Judge concluded that Long’s post-conviction petition was pending as of August 10, 1995 when new counsel was appointed to represent him, and thus the statute of limitations did not begin to run on April 24, 1996 when AEDPA took effect. Long does not appear to have filed pro se a petition for post-conviction relief prior to new counsel being appointed, or even after new counsel was appointed, and counsel did not file a petition on Long's behalf until December 27, 1996. It thus seems that, because a petition was not pending, the statute began to run on April 24, 1996 when AEDPA went into effect, ran for about eight months, and then was tolled on December 27, 1996. Whether Long had four months left in which to file his federal habeas petition when the statute began to run again on August 12, 1998, or a full twelve months, his filing of his federal habeas petition on April 16, 2002 was late, and Long has conceded that his habeas petition was untimely filed.
     
      
      . We thank court-appointed counsel for his able oral presentation and briefs, which were of great assistance.
     
      
      . For this reason, the non-federal habeas cases cited by Long holding that the statute of limitations may not be raised sua sponte are inapposite.
     
      
      . Habeas Rule 5, for example, has been amended, effective December 1, 2004, to provide that the answer shall state "whether any claim in the petition is barred by a failure to exhaust state remedies, a procedural bar, non-retroactivity, or a statute of limitations," and thus treats the AEDPA statute of limitations like other procedural habeas issues.
     