
    Richard B. OSBORN, Appellant (Plaintiff), v. Clarice Lyle MANNING, Appellee (Defendant).
    No. 90-63.
    Supreme Court of Wyoming.
    Oct. 19, 1990.
    
      Richard B. Osborn, pro se.
    Donald L. Painter, Casper, for appellee.
    Before URBIGKIT, C.J., and THOMAS, CARDINE, MACY and GOLDEN, JJ.
   MACY, Justice.

Appellant Richard B. Osborn filed suit against Appellee Clarice Lyle Manning, seeking recovery of costs incurred in the construction and maintenance of a partition fence. The district court determined that, under the doctrine of res judicata, Appellant was precluded from asserting his claim because of this Court’s decision in Osborn v. Manning, 685 P.2d 1121 (Wyo.1984), and dismissed Appellant’s suit.

We reverse and remand.

The dispositive issue is whether this Court’s decision in Osborn, 685 P.2d 1121, which affirmed the district court’s dismissal of Appellant’s claim for one-half of the construction costs for a partition fence, precludes Appellant from asserting a claim for the cost of maintaining the same fence.

In 1983, Appellant filed suit against Ap-pellee and two of her relatives, seeking one-half of the construction costs for a partition fence under Wyo.Stat. §§ 11-28-102 and 11-28-106 (1977). The case went to trial, and the district court granted Ap-pellee’s motion to dismiss pursuant to W.R. C.P. 41(b)(1), because Appellant failed to show an entitlement to relief. On appeal, this Court affirmed the district court’s decision. The Court based its affirmation, in part, on the fact that Appellant had failed to establish that he constructed a lawful fence under § ll-28-102(a). Osborn, 685 P.2d 1121.

In 1989, Appellant filed a complaint alleging, inter alia, that he completed construction on the fence in 1982, that the fence was a lawful fence under § ll-28-102(b), and that Appellee failed to maintain one-half of the fence as required by § 11-28-106. Appellant sought one-half of the construction costs, one-half of the maintenance costs for the period of 1983-88, and punitive damages. In her answer, Appellee generally denied Appellant’s allegations and moved to dismiss his complaint on the basis of the doctrines of res judica-ta and collateral estoppel.

The district court held a motion hearing and asked Appellant how this suit was different from the previous suit. Appellant responded by stating that changed circumstances prevented the court from invoking the doctrine of res judicata. Appellant contended that the fence was lawful under § ll-28-102(b), because it resisted breaching stock during the period subsequent to the first suit. Appellant did not present any evidence at the motion hearing. The district court concluded that the doctrine of res judicata precluded Appellant from claiming the fence was lawful and dismissed Appellant’s complaint with prejudice. This appeal followed.

The doctrines of res judicata and collateral estoppel

“incorporate a universal precept of common-law jurisprudence to the effect that a ‘right, question or fact distinctly put in issue and directly determined by a court of competent jurisdiction ... cannot be disputed in a subsequent suit between the same parties or their privies.’ ”

Rialto Theatre, Inc. v. Commonwealth Theatres, Inc., 714 P.2d 328, 336 (Wyo.1986) (quoting Delgue v. Curutchet, 677 P.2d 208, 213 (Wyo.1984)). Res judicata “constitutes an absolute bar to a subsequent action involving the same claim, demand, or cause of action.” Barrett v. Town of Guernsey, 652 P.2d 395, 398 (Wyo.1982), quoted in Swasso v. State ex rel. Wyoming Worker’s Compensation Division, 751 P.2d 887, 890 (Wyo.1988). See Rialto Theatre, Inc., 714 P.2d 328 (defining a cause of action).

The criteria used to determine res judica-ta’s applicability to a situation are: “(1) the parties were identical; (2) the subject matter was identical; (3) the issues were the same and related to the subject matter; and (4) the capacities of the persons were identical in reference to both the subject matter and the issues between them.”

Newell v. Trumper, 765 P.2d 1353, 1355 (Wyo.1988) (quoting Swasso, 751 P.2d at 890).

Appellant concedes that the doctrine of res judicata precludes his claim for construction costs. That doctrine does not preclude Appellant from asserting his claim for maintenance costs, however, because a claim for maintenance costs is not the same as a claim for construction costs.

We must also determine whether the doctrine of collateral estoppel precludes Appellant from asserting his claim for maintenance costs. The doctrine of collateral estoppel prevents “relitigation of issues which were involved actually and necessarily in the prior action between the same parties.” Delgue, 677 P.2d at 214, quoted in Matthews v. Fetzner, 768 P.2d 590, 592 (Wyo.1989). See Texas West Oil and Gas Corporation v. First Interstate Bank of Casper, 743 P.2d 857 (Wyo.1987), reconfirmed 749 P.2d 278 (Wyo.1988). Collateral estoppel does not apply if the facts or circumstances have changed since the resolution of the first suit. Montana v. United States, 440 U.S. 147, 99 S.Ct. 970, 59 L.Ed.2d 210 (1979). See also Johnson v. Flemming, 264 F.2d 322 (10th Cir. 1959) (discussing res judicata), and Restatement (Second) of Judgments § 27 comment c (1982).

Appellant contends that his claim for maintenance costs derived from facts which were different from those in existence at the time of the first decision and that, therefore, the doctrine of collateral estoppel does not bar his claim. We view the facts alleged in the complaint in the light most favorable to Appellant and agree that new circumstances would prevent the application of collateral estoppel. Champion Well Service, Inc. v. NL Industries, 769 P.2d 382 (Wyo.1989) (stating the rule that we review a motion to dismiss by accepting the facts alleged in the complaint as true and that we view the allegations in the light most favorable to the plaintiff). If an unlawful fence becomes lawful, the individual who maintains the fence may be entitled to reimbursement under § 11-28-106 for the period beginning when the fence became lawful. For example, if Appellant reconstructed the fence to meet the requirements of § ll-28-102(a) and then filed a claim for maintenance costs, the doctrine of collateral estoppel would not preclude him from asserting a claim for maintenance, because the court would be faced with a different fact situation; i.e., a new fence. Likewise, the doctrine of collateral estoppel does not prevent Appellant from attempting to prove the fence became legal after the first suit under § ll-28-102(b), because it was “as effective for resisting breaching stock as those described in subsection (a).”

Reversed and remanded. 
      
      . Section 11-28-102 provides in pertinent part: (a) The following are lawful fences in this state:
      (i) A fence made of steel, concrete or sound wooden posts and three (3) spans of barbed wire not more than fifteen (15) inches or less than ten (10) inches apart, or two (2) spans of barbed wire with a wooden rail on top. Wooden posts shall be at least four (4) inches in diameter. Posts shall be set firmly in the ground at least twenty (20) inches deep, at no greater distance apart than twenty-two (22) feet between the posts or thirty-three (33) feet with at least two (2) iron or wooden stays between the posts. Stays shall be placed equal distance apart from themselves and the post on either side;
      (ii) A post and board fence made of sound posts not less than four (4) inches in diameter set substantially in the ground not more than ten (10) feet apart, with three (3) boards sold as one (1) inch lumber eight (8) inches wide, and not more than ten (10) inches apart, or four (4) boards sold as one (1) inch lumber six (6) inches wide, not more than eight (8) inches apart, securely fastened with nails or otherwise;
      (iii) A four (4) pole fence with round poles not less than two (2) inches in diameter at the small end, with either upright or leaning posts not more than sixteen (16) feet apart, and securely fastened with nails, wires or otherwise.
      (b) All other fences made and constructed of boards, rails, poles, stones, hedge plants or other material which upon evidence is declared to be as strong and well calculated to protect enclosures, and is as effective for resisting breaching stock as those described in subsection (a) of this section, shall be considered a lawful fence.
      
      (Emphasis added.) Section 11-28-106 states:
      The owner of any lawful fence which is or becomes a partition fence separating the owner’s land from that belonging to some other person may require the person to pay for one-half (½) of what it would or does actually cost to construct the partition fence. In case of refusal, the owner may maintain a civil action against the person refusing and is entitled to recover one-half (½) of what it would or did actually cost to construct that portion of the partition fence used by the person and costs of suit. The joint users of a partition fence shall contribute to the cost of maintenance in proportion to their respective interests and if either refuses to pay his share of the cost of maintenance, the other may recover maintenance costs in the manner provided for recovering the cost of construction.
     
      
      . We view the district court's dismissal as a dismissal pursuant to W.R.C.P. 12(b)(6). See Sullivan v. Sullivan, 506 P.2d 813 (Wyo.1973).
     