
737 P.2d 543 (1987)
105 N.M. 762
Maria Concepcion BACA, Personal Representative of the Estate of Felix Vallejos Baca, Deceased, Plaintiff-Appellant,
v.
Ramon MARQUEZ, M.D. and Russell H. Kesselman, M.D., Defendants-Appellees.
No. 8482.
Court of Appeals of New Mexico.
January 22, 1987.
Certiorari Quashed May 21, 1987.
Mary L. Vermillion, Aguilar, Vermillion & Kirkwood, Albuquerque, for plaintiff-appellant.
W. Robert Lasater, Jr., Ellen G. Thorne, Rodey, Dickason, Sloan, Akin & Robb, P.A., Albuquerque, for defendant-appellee Ramon Marquez, M.D.
Alice Tomlinson Lorenz, Miller, Stratvert, Torgerson & Brandt, P.A., Albuquerque, for defendant-appellee Russell H. Kesselman, M.D.
William H. Carpenter, Carpenter Law Offices, Ltd., Albuquerque, for New Mexico Trial Lawyers Ass'n amicus curiae.

OPINION
GARCIA, Judge.
Plaintiff appeals from the trial court's assessment of costs in proportion to the percentages of negligence found by the jury.

FACTS
Plaintiff's claim for medical malpractice was tried to a jury which determined that plaintiff's decedent was 80% negligent, defendant Ramon Marquez, M.D., was 15% negligent and defendant Russell H. Kesselman, M.D., was 5% negligent.
Plaintiff subsequently filed a cost bill. Defendant Kesselman responded with objections and a motion to strike cost bill where he raised the issue of the propriety of apportioning costs in proportion to the percentage of fault. Following hearings on these matters, the trial court issued a memorandum opinion determining that, although plaintiff was the prevailing party, the trial court had discretion to apportion the costs under the circumstances of the case. The trial court allowed plaintiff to partially recover her costs, assessing 5% against defendant Kesselman and 15% against defendant Marquez.

ISSUE
The sole issue on appeal is whether the trial court erred and abused its discretion by awarding costs in proportion to the percentages of negligence found by the jury. We hold that the trial court's decision to *544 assess costs on the basis of comparative fault, as articulated in its well reasoned memorandum opinion, was within its discretion and we affirm.

DISCUSSION
We first address defendants' contention that plaintiff failed to preserve this issue for appeal. Under the facts of this case, we do not agree. There is a twofold purpose in stating an objection: to alert the trial court to error and to preserve the issue for review. See El Paso Electric Co. v. Real Estate Mart, Inc., 98 N.M. 570, 651 P.2d 105 (Ct.App. 1982). Here, defendant Kesselman raised the issue in his motion to strike cost bill and objections to cost bill. Additionally, the trial court was clearly aware of the issue of whether to assess costs in proportion to the negligence of the parties since it specifically addressed this issue in the memorandum opinion. Consequently, we believe the issue was preserved.
Under NMSA 1978, Civ.P. Rule 54(e) (Cum.Supp. 1985), costs may be awarded "to the prevailing party unless the court otherwise directs." Pursuant to this rule, we have held that "the matter of assessing costs * * * lies within the discretion of the trial court, and an appellate court will not interfere with the trial court's exercise of this discretion in this regard, except in the case of abuse." Hales v. Van Cleave, 78 N.M. 181, 185, 429 P.2d 379, 383 (Ct.App.), cert. denied, 78 N.M. 198, 429 P.2d 657 (1967); see also In re Estate of Head, 94 N.M. 656, 615 P.2d 271 (Ct.App. 1980).
In the case of Eichel v. Goode, Inc., 101 N.M. 246, 680 P.2d 627 (Ct.App. 1984), the trial court awarded costs against the defendants, nearly in proportion to their liability. We upheld the trial court's award determining that there was no abuse of discretion. Further, we held that a direct relation of percentage of fault to cost was not required; rather, the matter was within the trial court's discretion. Id. at 252, 680 P.2d 627. A related argument was advanced in Jaramillo v. Fisher Controls Co., 102 N.M. 614, 698 P.2d 887 (Ct.App. 1985), where the defendant complained because the trial court failed to apportion costs based on the percentage of liability. Again, we affirmed the trial court, recognizing wide discretion in the granting of costs. There need be no direct relation between percentage of fault and costs, Robison v. Campbell, 101 N.M. 393, 683 P.2d 510 (Ct.App. 1984), but it is within the trial court's discretion to award costs in such a manner. Trial courts are under no compulsion to apportion costs on the basis of fault, yet, in exercising their discretion, they may do so if they wish. The trial court determined that costs should be assessed against defendants in proportion to their fault and had wide latitude to so decide. Thus, the trial court is affirmed.
IT IS SO ORDERED.
DONNELLY, C.J., and FRUMAN, J., concur.
