
421 N.W.2d 527 (1988)
Terry L. SCHARK, Kevin W. Schark, and Travis Dale Schark, a Minor by his Mother and Next Friend, Terry Lynn Schark, Appellees,
v.
Frank GORSKI, Ali Kholeif, and North Anesthesiology, Inc., P.C., Appellants.
No. 87-155.
Supreme Court of Iowa.
April 13, 1988.
M.H. Pothoven and Mindy J. Morse of Clements, Pothoven, Pabst & Stravers, Oskaloosa, for appellants.
H. Alan Bowers of Baird, Bowers & Wilson, Des Moines, for appellees.
Considered by McGIVERIN, C.J., and HARRIS, CARTER, LAVORATO, and ANDREASEN, JJ.
*528 HARRIS, Justice.
This medical malpractice suit was dismissed by plaintiffs before trial but after completion of extensive and expensive discovery. Defendants contend the discovery costs should be taxed to plaintiffs. They appeal from a trial court determination that there is no authority to tax costs of discovery when a suit is dismissed prior to trial. We affirm.
Defendants administered anesthesia to plaintiff Terry Schark when she gave birth by caesarean section to plaintiff Travis Schark. Terry aspirated vomit into her lungs and suffered lung damage. She was hospitalized about four weeks. Terry, her husband Kevin, and their child brought this malpractice suit.
After nearly two years of extensive pretrial discovery the plaintiffs dismissed their action. Following dismissal the defendants filed the motion which is the subject of this dispute. Asserting they are the prevailing party for purposes of Iowa Code sections 625.1 and .11 (1985) and Iowa rule of civil procedure 157(a), defendants moved to collect costs from the plaintiffs for expenses incurred in making copies of various depositions, court reporters' fees for various depositions, transcription costs, travel expenses incurred in deposing the plaintiffs' out-of-state medical expert, and doctor's fees for examining Terry.
The district court denied the defendants' motion for costs on the ground that, because the action was dismissed before trial, none of the depositions were actually introduced into evidence, and thus an award for expenses would be improper under Woody v. Machin, 380 N.W.2d 727 (Iowa 1986). This appeal followed.
I. Court costs are taxable only to the extent provided by statute. Dole v. Harstad, 278 N.W.2d 907, 909 (Iowa 1979). Because costs were not recoverable at common law, statutes providing for their recovery are strictly construed. City of Ottumwa v. Taylor, 251 Iowa 618, 621, 102 N.W.2d 376, 378 (1960). Iowa Code section 625.1 (1987) states that "[c]osts shall be recovered by the successful party against the losing party." Section 625.11 states "[w]hen a plaintiff dismisses the action or any part thereof, ... judgment for costs may be rendered against such plaintiff...." An award of deposition costs against the losing party is limited by Iowa rule of civil procedure 157(a), which states:
Costs of taking and proceeding to procure a deposition shall be advanced by the party taking it, and he cannot use it in evidence until such costs are paid.... The judgment shall award against the losing party only such portion of these costs as were necessarily incurred for testimony offered and admitted upon the trial.

(Emphasis added.)
In interpreting rule 157(a), we said in Woody v. Machin that "a cost award may include only the cost of depositions which are introduced into evidence in whole or in part at trial." 380 N.W.2d at 730.
Plaintiffs in Woody argued for a broader interpretation of the rule, claiming that the depositions not introduced into evidence were nevertheless essential to their preparation for expert testimony at trial. In rejecting this interpretation we noted that the scope of recovery under rule 157(a) is more narrow than in federal practice, where deposition costs can be awarded when the court finds all or any part of a deposition was "necessarily obtained for use in the case." See Nissho-Iwai Co., Ltd. v. Occidental Crude Sales, 729 F.2d 1530, 1533 (5th Cir.1984) (costs allowed when depositions were used to help counsel structure questions of witnesses).
II. Defendants here think we should not apply the Woody v. Machin rule when a plaintiff voluntarily dismisses an action after extensive discovery. Under the circumstances they contend the trial court should determine which depositions, or parts of them, were "reasonably necessary for use in the case," and award costs accordingly. Such a rule, it is urged, would discourage indiscriminate harassment by costly and unnecessary discovery.
Some, though certainly not all, jurisdictions have seen merit in defendants' contention and have adopted the rule they *529 suggest. See Troutman Enter., Inc. v. Robertson, 273 So.2d 11, 13 (Fla.App.1973) (court erred in denying motion to tax costs against the plaintiffs when the plaintiffs voluntarily dismissed action); Keener v. Dunning, 238 So.2d 113, 114 (Fla.App. 1970) ("[W]here costs are incurred in the taking of depositions and the acquisition of documentary evidence, these costs should not be disallowed merely because the use of the depositions in the documentary evidence was obviated by a voluntary dismissal."); 20 C.J.S. Costs § 68(b) (1955) ("It is the general rule subject to certain limitations that a defendant is entitled to costs where the plaintiff voluntarily dismisses or discontinues his action."); 20 Am.Jur.2d Costs § 18 (1965). But see Nemeroff v. Abelson, 620 F.2d 339, 350 (2d Cir.1980) ("[G]enerally the defendant is not considered the prevailing party when . . . there is a voluntary dismissal of the action by the plaintiff. . . ."). See generally Annotation, Dismissal of Plaintiff's Action as Entitling Defendant to Recover Attorney's Fees or Costs as "Prevailing Party" or "Successful Party," 66 A.L.R.3d 1087 (1975).
Our holding in Woody v. Machin is at odds with the interpretation defendants suggest. We think there is less reason to assess discovery costs in dismissed cases than in cases which actually go to trial. We are not persuaded to overrule our Woody holding.
Safeguards to prevent plaintiffs from harassing defendants appear in Iowa rule of civil procedure 215, which allows for dismissal of a petition without order of court. The rule then provides:
A dismissal under this rule shall be without prejudice unless otherwise stated; but if made by any party who has previously dismissed an action against the same defendant, ... including or based on the same cause, dismissal shall operate as an adjudication against him on the merits, unless otherwise ordered by the court, in the interests of justice.
In Smith v. Lally, 379 N.W.2d 914, 916 (Iowa 1986), we said that "[t]he purpose of [rule 215] is to prevent indiscriminate dismissals of actions by litigants. Repeated filings and dismissals obviously have a harassing effect that the two-dismissal rule is designed to prevent." (Citation omitted.)
Other safeguards to protect a litigant from harassment appear in Iowa rule of civil procedure 80(a) (authorizing imposition of sanctions for filing frivolous pleadings or motions). Plaintiffs should not at any time be discouraged from dismissing claims, especially ones that prove to be wholly without merit.
The trial court was correct in holding it lacked jurisdiction to tax discovery costs in an action dismissed before trial.
AFFIRMED.
