Ordinarily, a defense based on the statute of limitations must be raised by the defendant through an affirmative defense, see Fed.R.Civ.P. 8(c), and the burden of establishing the affirmative defense rests on the defendant. See Newell v. Richards, 323 Md. 717, 594 A.2d 1152, 1156 (1991); Phoenix Sav. & Loan, Inc. v. Aetna Cas. & Sur. Co., 427 F.2d 862, 870 (4th Cir.1970). It follows, therefore, that a motion to dismiss filed under Federal Rule of Procedure 12(b)(6), which tests the sufficiency of the complaint, generally cannot reach the merits of an affirmative defense, such as the defense that the plaintiff's claim is time-barred. But in the relatively rare circumstances where facts sufficient to rule on an affirmative defense are alleged in the complaint, the defense may be reached by a motion to dismiss filed under Rule 12(b)(6). This principle only applies, however, if all facts necessary to the affirmative defense 'clearly appear[] on the face of the complaint.' Richmond, Fredericksburg & Potomac R.R. v. Forst, 4 F.3d 244, 250 (4th Cir.1993) (emphasis added); Desser v. Woods, 266 Md. 696, 296 A.2d 586, 591 (1972).