
645 N.W.2d 566 (2002)
11 Neb. App. 158
RANDOLPH OLDSMOBILE CO., Appellee,
v.
Bonnie J. NICHOLS, Appellant.
No. A-00-1244.
Court of Appeals of Nebraska.
May 21, 2002.
*567 James D. McFarland, of the McFarland Law Office, Lincoln, for appellant.
Thom K. Cope, Lincoln, and Ruth A. Laukka, of Polsky, Cope, Shiffermiller, Coe & Monzon, for appellee.
SIEVERS, CARLSON, and MOORE, Judges.
MOORE, Judge.

INTRODUCTION
Bonnie J. Nichols appeals the decision of the district court for Lancaster County, Nebraska, denying her motion for an award of attorney fees and costs pursuant to Neb.Rev.Stat. § 25-824 (Reissue 1995) on the basis that the action brought by Randolph Oldsmobile Co. (Randolph) was frivolous. For the reasons set forth herein, *568 we affirm in part, and in part reverse and remand with directions.

BACKGROUND
This matter stems from an incident related to a former consumer-service relationship between Nichols and Randolph wherein Nichols alleged that after she had taken her vehicle in for repair, Randolph spilled paint on it and refused to wash and wax it. The circumstances surrounding this incident escalated to the level that Nichols was cited by the Lincoln Police Department for trespassing after Nichols refused to leave Randolph's place of business.
Several days after Nichols was cited for trespassing, Randolph filed a verified petition for temporary and permanent injunction on September 9, 1998, to enjoin Nichols from returning to Randolph's business premises. Nichols timely answered the lawsuit, alleging that Randolph had filed a frivolous lawsuit, pursuant to § 25-824, and further alleging that she should be awarded reasonable attorney fees and costs for having to defend against the action.
Initially, in an effort to resolve this matter, Nichols' legal counsel contacted Randolph's legal counsel and requested a voluntary dismissal of the action in consideration for Nichols' agreement that she would no longer patronize Randolph's place of business in the future, but no agreement was reached.
On October 5, 1998, a hearing was held to determine whether the temporary restraining order previously issued by the court on September 10 was to continue. By letter dated October 6, 1998, indicating an entry in the judge's minutes, the district court vacated the temporary restraining order and denied Randolph's request for a preliminary injunction pending trial.
After some time had passed, Nichols again requested a voluntary dismissal of the lawsuit from Randolph. Hence, on April 5, 1999, Randolph served a dismissal without prejudice on Nichols' legal counsel. A short time later, Nichols filed a motion for an award of attorney fees and costs. In response to the motion, Randolph's legal counsel alleged that he was "`sandbagged'" into the dismissal because nothing was said about Nichols' seeking attorney fees and costs when the dismissal was negotiated. Subsequently, on April 22, Nichols stipulated to Randolph's withdrawal of the dismissal, and on May 11, the district court overruled Nichols' motion for attorney fees and costs, indicating that the motion was premature.
The parties, through their counsel, continued to negotiate, with the primary point of contention being Nichols' refusal to forgo her pursuit of attorney fees and costs. From the record, the only discovery evident was the service of a request for admissions on Randolph by Nichols, the allegations of which were answered by Randolph. As the trial date approached, a pretrial conference was held on May 30, 2000, which resulted in the case's being dismissed upon the oral motion of Randolph. On the following day, Nichols again filed a motion for an award of attorney fees and costs. The district court denied Nichols' motion on November 1 and stated in its ruling that the evidence failed to show that Randolph's case was brought in bad faith, was frivolous, or was brought for purposes of harassment or other improper conduct. From that order, Nichols has filed this appeal.

ASSIGNMENTS OF ERROR
Nichols claims, restated, that the district court erred in (1) failing to find that Randolph's petition for a temporary and permanent injunction was frivolous and *569 brought in bad faith under § 25-824(2), (2) failing to find that Randolph unnecessarily expanded the proceedings for purposes of harassment and other misconduct under § 25-824(4), and (3) failing to award her attorney fees and costs as provided for under § 25-824.

STANDARD OF REVIEW
The standard of review on the trial court's determination of a request for sanctions under § 25-824 is whether the trial court abused its discretion. Detmer v. Bixler, 10 Neb.App. 899, 642 N.W.2d 170 (2002). See Malicky v. Heyen, 251 Neb. 891, 560 N.W.2d 773 (1997).

ANALYSIS

Frivolous Lawsuit.
Nichols asserts on appeal that Randolph's action was frivolous and brought in bad faith, and she thus seeks attorney fees and costs under § 25-824(2).
Section 25-824(2) states:
Except as provided in subsections (5) and (6) of this section, in any civil action commenced or appealed in any court of record in this state, the court shall award as part of its judgment and in addition to any other costs otherwise assessed reasonable attorney's fees and court costs against any attorney or party who has brought or defended a civil action that alleges a claim or defense which a court determines is frivolous or made in bad faith.
The term "frivolous," as used in § 25-824, connotes an improper motive or legal position so wholly without merit as to be ridiculous. Peter v. Peter, 262 Neb. 1017, 637 N.W.2d 865 (2002). The definition of "frivolous" as set forth above has also been held to mean without rational argument based on law and evidence to support a litigant's position in the lawsuit. Tyler v. Stennis, 10 Neb.App. 655, 635 N.W.2d 550 (2001). Any doubt whether a legal position is frivolous or taken in bad faith should be resolved in favor of the one whose legal position is in question. Prokop v. Cannon, 7 Neb.App. 334, 583 N.W.2d 51 (1998). The determination of whether a particular claim or defense is frivolous must depend upon the facts of a particular case. Id. See Shanks v. Johnson Abstract & Title, 225 Neb. 649, 407 N.W.2d 743 (1987).
Although there is conflicting testimony as to the circumstances surrounding the events that led to Randolph's filing this action, Nichols argues that the lawsuit was frivolous and that Randolph filed its petition for an injunction in bad faith instead of allowing the trespassing citation issued to Nichols to deter her from any future contact with Randolph or its employees. Nichols further argues that the petition was brought in bad faith in that the trespassing citation was dismissed on November 23, 1998, thus demonstrating a lack of evidence for the trespassing charge. Finally, Nichols contends that the district court's denial of the temporary injunction for the reason that the evidence failed to show the likelihood that Randolph would prevail on the merits of its petition, in addition to the fact that Randolph's petition failed to show that Randolph would suffer irreparable injury if the temporary injunction were not granted, further evidenced the lack of merit and the frivolousness of the lawsuit.
Randolph, on the other hand, argues that it initially sought the injunctive relief to permanently restrain Nichols from entering upon its premises because of numerous problems with Nichols. Randolph claims that it thereafter refrained from voluntarily dismissing the lawsuit until the court ruled on Randolph's motion for a temporary injunction. Randolph asserts *570 that it was attempting to obtain the protection available in the form of an injunction as opposed to accepting a written agreement with Nichols that would be negotiated outside of the judicial system.
As emphasized by the Nebraska Supreme Court in Shanks, 225 Neb. at 656, 407 N.W.2d at 747, "'"[a]n appeal that is simply without merit is not by definition frivolous."'" (Emphasis omitted.) Furthermore, "'"all doubts as to whether an appeal is frivolous should be resolved in favor of the [party filing the allegedly frivolous action]."'" Id. Sanctions should not be imposed except in the "'"clearest cases."'" Id. In bringing the injunction action, Randolph was attempting to seek relief available to it through the judicial process for apparently disruptive behavior by Nichols at Randolph's place of business. Based upon our review of the record, we find that the district court did not abuse its discretion in ruling that Randolph's action was not frivolous or brought in bad faith.

Continuation of Lawsuit.
Nichols further argues that she is entitled to an award of attorney fees and costs under § 25-824(4), based on Randolph's unnecessary delay of this matter for purposes of harassment and other improper conduct.
Section § 25-824(4) sets forth the following:
The court shall assess attorney's fees and costs if, upon the motion of any party or the court itself, the court finds that an attorney or party brought or defended an action or any part of an action that was frivolous or that the action or any part of the action was interposed solely for delay or harassment. If the court finds that an attorney or party unnecessarily expanded the proceedings by other improper conduct, including, but not limited to, abuses of civil discovery procedures, the court shall assess attorney's fees and costs.
(Emphasis supplied.)
A review of the district court's order reflects that although the court stated that the evidence failed to show that this case was brought for purposes of harassment or other improper conduct, the court does not make a specific reference to § 25-824(4); nor does it make any reference to either party's unnecessarily expanding the proceedings. However, the court's use of the terms "harassment" and "improper conduct," together with its denial of Nichols' motion for attorney fees and costs, which motion referenced both subsections of § 25-824 at issue here, leads us to conclude that the district court considered both subsections (2) and (4) of § 25-824 in its ruling.
The question to be resolved under § 25-824(4) in this case is whether Randolph continued to prosecute the injunction action solely for harassment or unnecessarily expanded the proceedings by other improper conduct. In analyzing this issue, we believe the critical timeframe to be the activity following Randolph's initial voluntary dismissal without prejudice on April 5, 1999. The activity in the case prior to this dismissal is attributed to the bringing of the lawsuit, which we have found was not frivolous or in bad faith under § 25-824(2).
After receiving Nichols' first motion for attorney fees and costs, which was filed on April 13, 1999, Randolph's counsel wrote a letter to Nichols' counsel, dated April 14, 1999, in which Randolph's counsel stated:
Now, here's the plan. If your client continues to seek fees and costs, we will revoke our dismissal and proceed to trial. Therefore, your client will incur more costs and expenses because I can *571 tell you that if you persist in this attempt to collect fees, your client will see the inside of a courtroom.
Thereafter, Randolph withdrew the dismissal, and the litigation continued with the primary activity being the negotiation of another dismissal of the suit. Randolph refused to dismiss the case without an agreement by Nichols to sign a mutual release and thereby forgo her claim for attorney fees and costs. At this juncture, the only party who had the ability to end the litigation and stop both parties from incurring additional fees was Randolph, as Nichols could not file another motion for fees until the conclusion of the litigation.
It is clear that after April 14, 1999, Randolph's only purpose in continuing the litigation was to attempt to convince Nichols to give up her claim for attorney fees and costs by requiring Nichols to incur additional fees and expenses to prepare for trial. There was no evidence presented in the record that Randolph continued the litigation for the purpose of obtaining a permanent injunction, particularly where the evidence revealed that Nichols had not returned to the Randolph premises since the initial trespassing citation was issued upon her. Under these circumstances, we find that Randolph unnecessarily expanded the action after April 14, solely for harassment and by improper conduct. Therefore, the district court abused its discretion in failing to award fees and costs to Nichols under § 25-824(4).

Award of Attorney Fees and Costs.
Based upon the determinations made in the foregoing discussion of Nichols' assignments of error, we further conclude that the district court did not err in denying Nichols' motion for an award of attorney fees and costs under § 25-824(2), but did err in denying the motion under § 25-824(4). We therefore reverse in part, and remand the matter to the district court for a determination of the fees and costs to be awarded to Nichols after April 14, 1999, from the record previously made.

CONCLUSION
We conclude that Randolph's petition for an injunction against Nichols was not frivolous or brought in bad faith; however, we conclude that Randolph did unnecessarily expand the proceedings for the purpose of harassment and by improper conduct. We also conclude that the district court did not err in denying Nichols' motion for an award of attorney fees and costs under § 25-824(2), but did err in denying the motion under § 25-824(4). Therefore, the judgment of the district court is affirmed in part and in part reversed, and the cause is remanded with directions to award Nichols fees and costs incurred in the district court after April 14, 1999.
AFFIRMED IN PART, AND IN PART REVERSED AND REMANDED WITH DIRECTIONS.
