delivered the Opinion of the Court.
This is an appeal from a dismissal by the Eleventh Judicial District Court, Flathead County, of an action involving the parties’ law firm. We reverse.
The appellant has raised several questions for review. We consider only one as determinative of the action before us:
Did the District Court err by dismissing this case without notice to the parties after five years of inaction on the case?
Appellant and respondent were partners in a Kalispell law firm from July of 1984 until August of 1985. During August, the partnership dissolved with each partner agreeing to account for respective unbilled billable hours and hours on contingency fee cases.
A complaint was filed by DeJana on December 24, 1987, alleging various failures on the part of Oleson to account for unbilled billable and contingency hours, failure to account for funds that had been diverted by Oleson, and alleging such things as theft, conversion of funds, and breach of the covenant of good faith and fair dealing.
During May of 1988, DeJana served various Requests for Admission and Production. Following these requests, Oleson sought a protective order from the court and DeJana sought an order to compel arbitration. These matters were heard by the court which issued an omnibus order on June 16, 1988. The order dismissed the action as to Atherton which has not been appealed. The order granted Oleson’s motion for a protective order and further ordered that both parties were to cease discovery. DeJana’s request for appointment of an arbitrator was denied as was DeJana’s demand for a jury trial because the court considered this an action in equity. The court also granted the parties thirty days to reach a settlement.
DeJana objected to the ruling but the court did not rule on the objection. Nothing further was done in this proceeding and nothing was filed until, without notice, the court dismissed the case with prejudice on July 13, 1993, due to lack of any action for five years.
*64Did the District Court err by dismissing this case without notice to the parties after five years of inaction on the case?
DeJana argues that the court abused its discretion by dismissing the action. He points out that the District Court ordered that both DeJana and Oleson cease further discovery efforts in this cause and concluded that the case is an accounting which the court would resolve on equitable principles. Finally, the court in its June 16,1988 order, provided that the parties were granted thirty days to effect a compromise and “[i]n the absence of settlement, the Court will schedule a trial before the Court, sitting without a jury.” Oleson argues that no requirement exists for warning prior to dismissal. We conclude that a warning was appropriate under the facts of this case.
It is true that a district court is accorded broad discretion in determining whether a cause of action should be dismissed for failure to prosecute. Shackleton v. Neil (1983), 207 Mont. 96, 672 P.2d 1112. However, because dismissal for failure to prosecute is a harsh remedy, the court does not have unlimited discretion to grant an involuntary dismissal. Becky v. Norwest Bank (1990), 245 Mont. 1, 798 P.2d 1011. Courts exist primarily to afford a forum to settle litigable matters between disputing parties. Brymerski v. City of Great Falls (1981), 195 Mont. 428, 636 P.2d 846. Therefore, the district courts must balance the concerns of judicial efficiency embodied in Rule 41(b), M.R.Civ.P., against a party’s right to meaningful access to the judicial system. Timber Tracts, Inc. v. Fergus Elec. Co-op, Inc. (1988), 231 Mont. 40, 753 P.2d 854.
Both parties in the present case cite Becky as precedent for the factors that we must consider when determining whether a court abused its discretion in dismissing an action for failure to prosecute. Those factors are: (1) the plaintiff’s diligence in prosecuting his or her claims, (2) the prejudice to the defense caused by the plaintiff’s delay, (3) the availability of alternate sanctions; and (4) the existence of a warning to plaintiff that his or her case is in danger of dismissal. Becky, 245 Mont. at 8, 798 P.2d at 1015. Oleson argues that a warning is not mandatory. Becky emphasizes that the facts of each case control, stating:
There is no precise formula for determining when an action may properly be dismissed for failure to prosecute. Each case turns on its own particular set of circumstances, and lapse of time in and of itself is insufficient to justify dismissal.
Becky, 245 Mont. at 7, 798 P.2d at 1015. Here, the court gave no reason for its dismissal except for the time that had elapsed: “There being *65no action in this cause since August 16,1988, this case is by the Court hereby DISMISSED with prejudice.”
A review of the record indicates that no action existed because the court, in its omnibus order of June 16,1988, cut off all alternatives for the parties except for “compromise and settlement of the litigation.” The court stated that if the parties did not settle, it would set a trial date. DeJana objected to the court’s denial of his trial by jury and failure of the court to appoint an arbitrator. Oleson then moved the court for partial adjudication which the court granted on August 18, 1988. The last sentence of that order states:
This order is without prejudice to any right of the Plaintiff on any pending issue in this cause.
The District Court effectively eliminated further action by the two parties. Under all these circumstances we conclude that the warning was necessary on the part of the court prior to dismissal. We hold the District Court abused its discretion in dismissing the case.
Reversed and remanded for further proceedings consistent with this opinion.
JUSTICES HARRISON, GRAY, NELSON and TRIEWEILER concur.