
186 P.3d 630 (2008)
Larry G. ANDRUS, Sr., and Linda Andrus, husband and wife, Plaintiffs-Counterdefendants-Appellants,
v.
Scott NICHOLSON and Sherri Nicholson, husband and wife; Elmer Stahle and Jane Doe Stahle, husband and wife; Rohl Hipwell and Jane Doe Hipwell, husband and wife; and John Does I through X, Defendants-Counterclaimants-Respondents.
No. 33302.
Supreme Court of Idaho, Boise, May 2008 Term.
June 4, 2008.
*631 Larry and Linda Andrus, Caldwell, appellants pro se. Larry Andrus argued.
*632 Yost Law Offices, Nampa, for respondents Nicholson. William "Bud" Yost argued.
Schroeder & Lezamiz Law Offices, L.L.P., Boise, for respondents Stahle and Hipwell. W. Alan Schroeder argued.
EISMANN, Chief Justice.
This is an appeal of an order dismissing the action on the ground of res judicata. We affirm the district court and award attorney fees on appeal to the Nicholsons.

I. FACTS AND PROCEDURAL HISTORY
Larry and Linda Andrus own mining claims located on public land in Owyhee County. To access their claims, they have used a road that crosses land owned by Scott and Sherri Nicholson and then land owned by Elmer and Joyce Stahle. In 2002 the Nicholsons denied the Andruses permission to use that part of the road that crossed the Nicholsons' property. On October 27, 2003, the Andruses and others who also owned mining claims in the area filed a lawsuit against the Nicholsons seeking to obtain the right to use that part of the road that crossed the Nicholsons' property. They alleged: (1) that the road was a public road; (2) that they had a prescriptive easement to use the road; (3) that they had an implied easement or easement by necessity to use the road; (4) that they had a contractual right to use the road; and (5) that they had a "statutory right" to use the road pursuant to Idaho Code § 47-901. The district court granted summary judgment to the Nicholsons, dismissing the complaint with prejudice. The Andruses did not appeal the dismissal of that action.
On May 13, 2005, the Andruses and nine of the plaintiffs from the 2003 lawsuit filed this action seeking to condemn a right of way across the Nicholsons' and Stahles' properties pursuant to Idaho Code § 47-903. They later amended their complaint to add Rohl and Faye Hipwell as defendants because they had contracted to purchase a portion of the Stahles' property. The Nicholsons, Stahles, and Hipwells moved for summary judgment. The district court granted the Nicholsons' motion for summary judgment on the grounds that this action was barred by the doctrine of res judicata based upon the dismissal of the 2003 lawsuit with prejudice and that the Plaintiffs had not met the public use requirement for condemning a right of way under Idaho Code § 47-903. It later granted the Stahles' and Hipwells' motion for summary judgment on the latter ground. It also awarded costs and attorney fees to the Defendants. The Plaintiffs timely appealed, but all Plaintiffs except the Andruses later dismissed their appeals.

II. ISSUES ON APPEAL
1. Did the district court err in holding that the Andruses' claim in this case was barred by the doctrine of res judicata?
2. Are the Nicholsons entitled to an award of attorney fees on appeal pursuant to Idaho Code § 12-121?

III. ANALYSIS
A. Did the District Court Err in Holding that the Andruses' Claim in this Case Was Barred by the Doctrine of Res Judicata?
As mentioned above, in 2003 the Andruses and others brought an action against the Nicholsons seeking the right to use existing roads across the Nicholsons' property in order to access mining claims. They alleged: (1) that the roads were public roads; (2) that they had a prescriptive easement to use the roads; (3) that they had an implied easement or easement by necessity to use the roads; (4) that they had a contractual right to use the roads; and (5) that they had a "statutory right" to use the roads pursuant to Idaho Code § 47-901. The district court in the 2003 action dismissed that complaint with prejudice, and the Plaintiffs in that case did not appeal.
In 2005 the Andruses and others brought this action seeking the right to use the same roads that cross the Nicholsons' property and then cross the Hipwells' property. The Andruses later filed an amended complaint to add the Stahles' as defendants because they had contracted to purchase a portion of the Hipwells' property.
*633 In the 2005 action, the Andruses alleged that Idaho Code § 47-901 granted them a right of way over the Defendants' lands and that Idaho Code § 47-903 granted them the right to condemn a right of way over the Defendants' land. The issue is whether the district court correctly held that these two claims were barred by res judicata.
"Whether res judicata . . . bars the relitigation of issues adjudicated in prior litigation between the same parties is a question of law upon which this Court exercises free review." Lohman v. Flynn, 139 Idaho 312, 319, 78 P.3d 379, 386 (2003). "Res judicata is comprised of claim preclusion (true res judicata) and issue preclusion (collateral estoppel)." Hindmarsh v. Mock, 138 Idaho 92, 94, 57 P.3d 803, 805 (2002). "For claim preclusion to bar a subsequent action there are three requirements: (1) same parties; (2) same claim; and (3) final judgment." Ticor Title Co. v. Stanion, 144 Idaho 119, 124, 157 P.3d 613, 618 (2007). Each of those requirements will be discussed separately.
Same parties. "[T]he doctrine of res judicata (claim preclusion) bars the presentation of the claim in a subsequent lawsuit between the same parties or their privies." Devil Creek Ranch, Inc. v. Cedar Mesa Reservoir and Canal Co., 123 Idaho 634, 637, 851 P.2d 348, 351 (1993). Both the Andruses and the Nicholsons were parties in both lawsuits. The Andruses were plaintiffs in both the 2003 lawsuit and in this lawsuit, and the Nicholsons were defendants in both actions. Therefore, the "same parties" requirement was met.
Same claim. The next issue is whether both lawsuits involved the same claim. The Andruses alleged two causes of action in the 2005 lawsuit. First, they alleged, "Idaho Code § 47-901 grants a right of way for mining purposes across the Defendants' [sic] granting unto the Plaintiff ingress and egress." That is the same cause of action they made in the 2003 lawsuit. In that case they alleged that Section 47-901 granted them a "statutory right" to use the road. Therefore, this cause of action is the same claim alleged in the earlier lawsuit.
The second cause of action alleged in the 2005 lawsuit is that "Idaho Code § 47-903 grants unto the Plaintiffs the right to condemn the right of way if it is necessary, and if the right of way cannot be acquired by agreement with the claimant or the owners of the lands." They prayed that "if Plaintiffs and Defendants are unable to reach an agreement regarding the use of the roads to access their mining claims, the road be condemned pursuant to Idaho Code." A cause of action to condemn a right of way pursuant to Idaho Code §§ 47-901 et seq. was not alleged in the 2003 lawsuit. However, claim preclusion under the doctrine of res judicata is not limited to theories that were actually litigated in the prior lawsuit.
As we said in Joyce v. Murphy Land & Irrigation Co., 35 Idaho 549, 553, 208 P. 241, 242-43 (1922), "[T]he former adjudication concludes parties and privies not only as to every matter offered and received to sustain or defeat the claim, but also as to every matter which might and should have been litigated in the first suit." The prior adjudication "extinguishes all claims arising out of the same transaction or series of transactions out of which the cause of action arose." Diamond v. Farmers Group, Inc., 119 Idaho 146, 150, 804 P.2d 319, 323 (1990). The determination of whether a group of facts constitutes a "transaction" is to be made "pragmatically, giving weight to such considerations as whether the facts are related in time, space, origin, or motivation, whether they form a convenient trial unit, and whether their treatment as a unit conforms to the parties' expectations or business understanding or usage." Restatement (Second) of Judgments § 24 (1982). A cause of action can be barred by a prior adjudication even though the theory of liability and supporting evidence differ from the cause of action actually litigated in the prior lawsuit. Magic Valley Radiology, P.A. v. Kolouch, 123 Idaho 434, 437-39, 849 P.2d 107, 110-112 (1993).
In the 2003 lawsuit, the Andruses sought the right to access their mining claims by using roads crossing the Nicholsons' property. They alleged various theories under which they claimed they were entitled to use *634 those roads. Now, they seek the right to use the roads by alleging that they are entitled to condemn a right of way over them pursuant to Idaho Code § 47-903. That cause of action arises out of the same transaction as the causes of action alleged in the prior lawsuit. It is simply another theory under which the Andruses are seeking to obtain the same result that they sought in the first lawsuit-the right to use the roads across the Nicholsons' property. The condemnation proceedings could have been, and should have been, brought in the first lawsuit. Therefore, the "same claim" requirement was met.
Final judgment. For claim preclusion to apply, the prior judgment must be a valid final judgment rendered on the merits. Hindmarsh v. Mock, 138 Idaho 92, 94, 57 P.3d 803, 805 (2002). In this case, the district court in the 2003 lawsuit had jurisdiction over the parties and the subject matter of the litigation, and it entered a final judgment dismissing the complaint. That judgment was also on the merits. It granted summary judgment to the defendants on the ground that the plaintiffs, including the Andruses, had failed to present sufficient evidence to raise a genuine issue of material fact as to any of the causes of action alleged in that action. The grant of summary judgment in the 2003 lawsuit was based upon the merits of the plaintiffs' causes of action, and therefore the judgment entered in that case is entitled to preclusive effect. Ross v. Ross, 117 Idaho 548, 552, 789 P.2d 1139, 1143 (1990). The "final judgment" requirement was met.
In summary, the judgment entered in the 2003 lawsuit was a valid final judgment between the Andruses and the Nicholsons on the same claim that the Andruses brought against the Nicholsons in the 2005 lawsuit. The district court did not err in holding that the 2005 lawsuit was barred by the doctrine of res judicata and in dismissing it as to the Nicholsons on that ground.
The Stahles and Hipwells were not parties to the 2003 lawsuit, nor are they privies to any party in that lawsuit. Therefore, res judicata does not apply to them.
In their 2005 lawsuit, the Andruses alleged two causes of action against the Stahles and Hipwells. First, they alleged, "Idaho Code § 47-901 grants a right of way for mining purposes across the Defendants' [sic] granting unto the Plaintiff ingress and egress." This cause of action is based upon a misinterpretation of the statute. Idaho Code § 47-901 does not grant a right of way.[1] Idaho Code §§ 47-901 et seq. grant the owners, locators, and occupants of mining claims the right to acquire through condemnation a right of way for mining purposes. Marsh Mining Co. v. Inland Empire Min. & Mill. Co., 30 Idaho 1, 165 P. 1128 (1917). Because it was based upon a misinterpretation of the statute, the district court did not err in dismissing this cause of action.
The other cause of action alleged against the Stahles and Hipwells sought to condemn a right of way over existing roads pursuant to Idaho Code §§ 47-901 et seq. Condemnation under those code sections must be for the purposes specified in Idaho Code §§ 47-902[2] or 47-903.[3]Marsh Mining *635 Co., 30 Idaho at 11, 165 P. at 1129. In this case, the district court noted that in order to use that portion of the roads located on the Stahles' and Hipwells' properties, the Andruses must first cross the Nicholsons' property. The roads cross the Nicholsons' property before they cross the Stahles' and Hipwells' properties. If the Andruses cannot get access across the Nicholsons' property, then they cannot get access to that portion of the roads on the Stahles' and Hipwells' properties. Therefore, condemning a right of way on the roads crossing the Stahles' and Hipwells' properties would not enable the Andruses to access or work their mining claims. Since the Andruses have not shown that they are entitled to condemn a road across the Stahles' and Hipwells' properties for any of the purposes specified in Idaho Code §§ 47-902 and 47-903, the district court did not err in dismissing the condemnation cause of action.
B. Are the Nicholsons Entitled to an Award of Attorney fees on Appeal Pursuant to Idaho Code § 12-121?
The Nicholsons seek an award of attorney fees on appeal pursuant to Idaho Code § 12-121. Attorney fees can be awarded on appeal under that statute only if the appeal was brought or defended frivolously, unreasonably, or without foundation. Gustaves v. Gustaves, 138 Idaho 64, 57 P.3d 775 (2002). The Andruses did not address on appeal the grounds upon which the district court granted the Nicholsons' motion for summary judgment. They simply sought to re-argue the merits of their claimed right to use the roads. We award the Nicholsons attorney fees on appeal pursuant to Idaho Code § 12-121.

IV. CONCLUSION
We affirm the judgment of the district court. We award costs on appeal to the respondents and we award the Nicholsons attorney fees on appeal.
Justices BURDICK, J. JONES, W. JONES and Justice Pro Tem TROUT concur.
NOTES
[1]  Idaho Code § 47-901 provides as follows:

The owner, locator or occupant of a mining claim, whether patented under the laws of the United States or held by location or possession, may have and acquire a right of way for ingress and egress, when necessary in working such mining claim, over and across the lands or mining claims of others, whether patented or otherwise.
[2]  Idaho Code § 47-902 provides as follows:

When any mine or mining claim is so situated, that for the more convenient enjoyment of the same a road, railroad or tramway therefrom, or ditch or canal to convey water thereto, or a ditch, flume, cut or tunnel to drain or convey the waters or tailings therefrom, or a tunnel or shaft, may be necessary for the better working thereof, which road, railroad, tramway, ditch, canal, flume, cut, shaft or tunnel, may require the use or occupancy of lands or mining grounds, owned, occupied or possessed by others than the person or persons or body corporate, requiring an easement for any of the purposes described, the owner, claimant or occupant of the mine or mining claim first above mentioned, is entitled to a right of way, entry and possession for all the uses and privileges for such road, railroad, tramway, ditch, canal, flume, cut, shaft or tunnel, in, upon, through and across such other lands or mining claims, upon compliance with the provisions of this chapter.
[3]  Idaho Code § 47-903 provides as follows:

When the owner, claimant or occupant or [of] any mine or mining claim desires to work the same, and it is necessary, to enable him to do so successfully and conveniently, that he have a right of way for any of the purposes mentioned in the foregoing sections, if such right of way cannot be acquired by agreement with the claimant or owner of the lands or claims over, under, through, across or upon which he seeks to acquire such right of way, he may commence an action in the district court in and for the county in which such right of way, or some part thereof, is situated, by filing a verified complaint containing a particular description of the character and extent of the right sought, a description of the mine or claim of the plaintiff, and of the mine or claim and lands to be affected by such right of way or privilege, with the name of the occupant or owner thereof. He may also set forth any tender of compensation that he may have made, and demand the relief sought.
