
503 N.W.2d 422 (1993)
Roger CLARK and Anita Clark, Husband and Wife, Appellants,
v.
Leo P. MILLER, Woodbury County Sheriff; Thomas S. Mullin, Woodbury County Attorney; and Woodbury County, Iowa, A Municipal Corporation, Appellees.
No. 92-1400.
Supreme Court of Iowa.
July 21, 1993.
*423 Glenn A. Metcalf of Metcalf, Thompson & Phipps, Moville, for appellants.
Douglas L. Phillips of Klass, Hanks, Stoos, Stoik & Villone, Sioux City, for appellees.
Considered by McGIVERIN, C.J., and SCHULTZ, LAVORATO, NEUMAN, and ANDREASEN, JJ.
ANDREASEN, Justice.
Iowa Code section 613A.5 (1983) required a person claiming tort damages against a governmental subdivision to commence the action within six months after injury. If the governmental subdivision received written notice describing the claim within sixty days of the incident, however, the plaintiff could commence the suit within two years after such notice. In Miller v. Boone County Hospital, 394 N.W.2d 776, 780 (Iowa 1986), we found section 613A.5 unconstitutional. We held Iowa Code chapter 614 is the applicable statute of limitations for all actions arising under chapter 613A. Id. at 781. Under chapter 614, an action for personal injury must be filed within two years of the date of injury. Iowa Code § 614.1(2).
In this case, we must decide if our decision in Miller prevents the commencement of an action filed within two years after sufficient and timely notice of the claim had been given, as permitted under section 613A.5, but not commenced within two years of the date of injury. The district court found the action was barred because of the limitations of section 614.1 and dismissed the suit. We conclude the statutory provisions of section 613A.5, extending the period for filing of an action if written notice of the claim is given, are applicable. We reverse the district court's decision and remand for further proceedings.

I. Scope of Review.

The bar of the statute of limitations can be raised by a motion to dismiss. Harden v. State, 434 N.W.2d 881, 883 *424 (Iowa 1989). We review the district court's order dismissing the action for errors at law. Iowa R.App.P. 4. Our review is limited to the issues raised by, and the allegations contained in, the pleadings. Harryman v. Hayles, 257 N.W.2d 631, 633 (Iowa 1977). Although other issues were raised in the motion to dismiss, the district court ruling was based solely upon the statute-of-limitations defense. It is this issue we address on appeal.

II. Background.

Following his arrest on March 5, 1990, Roger Clark was incarcerated in the Woodbury County jail. On March 10, he was extradited as a fugitive and transferred to the custody of the State of Arizona. Four days later, on March 14, he mailed notice pursuant to Iowa Code section 613A.5 to Leo P. Miller, Woodbury County Sheriff, Thomas S. Mullin, Woodbury County Attorney, and to the Woodbury County Board of Supervisors.
On March 13, 1992, Clark and his wife Anita, commenced an action in the Iowa District Court. Clark alleges he was not permitted to consult with an attorney and that he was not taken before a judge before being transferred to Arizona authorities. He claims damages for violation of his civil rights as provided by 42 U.S.C. § 1983 and his common-law rights to recover for wrongful detention and negligence. His wife claims damages for loss of consortium.
In response, the defendants filed a motion to dismiss. The statute-of-limitations defense was one of the grounds alleged in support of the motion. The court granted the motion to dismiss. Clark timely appealed the ruling.

III. Statute of Limitations Defense.

Iowa Code section 613A.5 (1991) provides in pertinent part:
Every person who claims damages from any municipality or any officer, employee or agent of a municipality for or on account of any wrongful death, loss or injury ... shall commence an action therefor within six months, unless said person shall cause to be presented to the governing body of the municipality within sixty days after the alleged wrongful death, loss or injury a written notice stating the time, place, and circumstances thereof and the amount of compensation or other relief demanded.... No action therefor shall be maintained unless such notice has been given and unless the action is commenced within two years after such notice.
This statute has not been amended since 1974. The term "municipality" means "city, county, township, school district, and any other unit of local government...." Iowa Code § 613A.1(1). Chapter 613A was transferred to chapter 670 by the Code Editor for 1993.
The district court in its ruling upon the defendants' motion to dismiss stated:
Because Section 613A.5 of the Iowa Code was declared unconstitutional by the Iowa Supreme Court in the case of Miller v. Boone County Hosp., 394 NW2d 776 (Iowa 1986), and because the Miller case held that Chapter 614 of the Iowa Code applies to actions commenced under Chapter 613A, and because the case of Wycoff v. Menke, 773 F.2d 983, 984 (8th Cir.1985) holds that Chapter 614 of the Iowa Code applies to 42 U.S.C. Sec. 1983 claims, and because the cause of action here accrued no later than March 10th, 1990, two years have elapsed and the plaintiffs are time barred under Section 614.1(2) of the Iowa Code.
In Miller, we applied the rational basis test to determine if section 613A.5 violated "the equal protection clauses of both the federal (14th amendment) and Iowa (Article I, section 6) constitutions." 394 N.W.2d at 778. We stated the "[f]ailure to commence an action within six months unless a notice is given within 60 days arbitrarily bars victims of governmental torts while victims of private torts suffer no such bar." Id. at 780. We concluded the six-month statute of limitation, in which no notice is given, had proved to be a trap for the unwary. Id. In Miller, the issue of severability was not presented or discussed. Notice had not been given to the local government. The *425 validity of the provision of section 613A.5 prohibiting actions that are not commenced within two years after giving notice was not addressed.
We have an obligation to preserve as much of a statute as possible within constitutional restraints. Federal Land Bank of Omaha v. Arnold, 426 N.W.2d 153, 157 (Iowa 1988). We declare unconstitutional only that portion of the statutory section that violates constitutional provisions. Id. Ordinarily we sustain valid portions of an enactment that can be separated from the invalid portions. City of Council Bluffs v. Cain, 342 N.W.2d 810, 815 (Iowa 1983). In Harryman, the plaintiff claimed the provision of section 613A.5 that allows an incapacitated person a reasonable time for giving notice "not to exceed ninety days" offended both the Equal Protection and Due Process Clauses. 257 N.W.2d at 634. We concluded the provision "not to exceed ninety days" violates equal protection guarantees. We excised the offensive part of section 613A.5 "to save as much of the statute as possible, eliminating only that which is necessary to make it constitutionally sound." Id. at 635.
Severance of unconstitutional provisions from constitutional portions of a statute is appropriate if it does not substantially impair legislative purpose, the enactment remains capable of fulfilling the apparent legislative intent, and the remaining portion of the enactment can be given effect without the invalid provision. American Dog Owners Ass'n, Inc. v. City of Des Moines, 469 N.W.2d 416, 418 (Iowa 1991). The concept of severance is also recognized by statute. Iowa Code section 4.12 provides:
If any provision of an Act or statute or the application thereof to any person or circumstance is held invalid, the invalidity does not affect other provisions or applications of the Act or statute which can be given effect without the invalid provision or application, and to this end the provisions of the Act or statute are severable.
Thus, there is no presumption that the legislature intends its statutes to be treated as an entirety.
We find the provisions of section 613A.5 can be severed to exclude the unconstitutional portion of the statute while retaining the remaining portion. Allowing the statute of limitations to be extended so as to permit a filing of an action within two years after timely notice of the claim has been given does not violate equal protection guarantees. To allow a person to commence a tort action against a unit of local government within two years after giving timely notice is not patently arbitrary. Such a provision bears a rational relationship to a legitimate governmental interest. The objective of such an extension is not to bar stale claims, but to encourage prompt reporting of claims. We find the remaining portion of section 613A.5 fulfills an apparent legislative intent. Similar statutory authority extending the time to begin a suit is provided in the Iowa Tort Claims Act. Iowa Code § 25A.13.
We reverse the district court ruling dismissing this suit on the statute-of-limitations defense. We remand to the district court so that it can consider other reasons urged in the defendants' motion to dismiss and for further proceedings.
REVERSED AND REMANDED.
