
385 S.E.2d 522 (1989)
Milford R. BALLANCE and Wife, Dorothy Mae Ballance, and Wayne Ballance
v.
Norris DUNN, Ronnie Culeys, S.B. Seymour and Joe Seymour.
No. 881DC1418.
Court of Appeals of North Carolina.
November 21, 1989.
*523 Twiford, O'Neal & Vincent by Edward A. O'Neal, Elizabeth City, for plaintiff appellants, Milford R. and Dorothy Mae Ballance.
E. Ray Etheridge, and White, Hall & Morgan by Gerald F. White, Elizabeth City, for defendant appellees.
COZORT, Judge.
Plaintiff appeals from an Order granting defendant's motion for summary judgment. We affirm.

I
This case involved two legal actions alleging trespass to land claimed by the plaintiffs. In the second action (No. 86CVD44), the defendants, citing the judgment in the first action (No. 84CVD41), pled res judicata as an affirmative defense and moved for summary judgment, which the trial court granted. To understand the court's ruling it is necessary to review the procedural history of both actions in some detail.
The parcel of land at issue, approximately 255 feet in length and 25 feet in width, is known as "Old Sawyer Road" or "Sawyer Road" and adjoins North Carolina Road 1139 in Camden County. On 22 August 1984, plaintiffs filed a complaint alleging that defendants, on the day before, had destroyed fences and trees on Sawyer Road. The plaintiffs claimed title to this property by virtue of two warranty deeds. The first deed was acquired in September 1947 and recorded the following month; the second deed was acquired in September 1948 and recorded in January 1949. The plaintiffs sought damages and an injunction to prevent defendants from entering the property.
On 23 October 1984, before defendants had answered, plaintiffs, pursuant to Rule 15(a) of the N.C. Rules of Civil Procedure, amended their complaint by alleging, as an alternative basis of title, that they had acquired ownership of Sawyer Road by adverse possession for twenty years. They also alleged, more particularly, that the "property known as Sawyer Road had been abandoned by the public and plaintiffs fenced all of Sawyer Road and have claimed all of said road since September of 1948."
On 23 October 1984, the defendants answered the original complaint. On 16 April 1985, the defendants answered the amended complaint and asserted a counterclaim for damages resulting from the "Restraining Order denying The Chesapeake Corporation of Virginia ... [and] the defendants" the use of Sawyer Road, "the nearest right of way to the public road." On 8 May 1985 the plaintiffs replied to the defendants' counterclaim.
On 29 September 1986, the first action was tried before a jury. At the close of all the evidence, the trial court ruled that there was insufficient evidence to send to the jury the issue of whether the public had acquired a right of way in Sawyer Road. The only issue submitted to the jury was whether the plaintiffs had acquired title to Sawyer Road by adverse possession. After the jury's verdict against the plaintiffs on that issue, the trial court entered judgment on 2 October 1986 as follows: the plaintiffs did not acquire title to Sawyer Road by adverse possession; the defendants did not commit a trespass as alleged; and the defendants failed to prove that Sawyer Road was a public right of way.
Between the time the plaintiffs filed suit in case No. 84CVD41, and the time the case came on for trial, the plaintiffs acquired two quitclaim deeds purportedly conveying title to Sawyer Road. Plaintiffs obtained the first quitclaim deed on 26 November 1984 and recorded it two days later; they obtained the second on 23 October 1985 and recorded it the same day. E.H.P. Land Co. was the grantor of both deeds, and both deeds recited consideration of one dollar. These quitclaim deeds were not raised in the first lawsuit; however, they formed the basis for the second action in which the plaintiffs again alleged trespass.
*524 Plaintiffs initiated case No. 86CVD44, the action at issue here, on 14 November 1986. Their complaint included an allegation of battery (subsequently referred to by the trial court and the plaintiffs as an alleged assault) and an allegation that the defendants had committed trespass by installing culverts and destroying fences and shrubs within the boundaries of Sawyer Road. Plaintiffs claimed record ownership of Sawyer Road based on the quitclaim deeds described above. They requested compensatory and punitive damages as well as injunctive relief. As an affirmative defense the defendants pleaded the final judgment in case No. 84CVD41 "in bar of plaintiff's right to maintain this action ... [in that] all matters in this action, either fact or law, were or should have been ... adjudicated in ... [the] former action."
On 14 November 1986 the trial court issued the temporary restraining order requested by the plaintiffs. On 22 January 1987, because of the violence and threat of violence associated with the dispute over ownership and use of Sawyer Road, the court entered a preliminary injunction restraining both plaintiffs and defendants "until further Order of the Court or final decision on the merits from entering on the lands described ... as `Old Sawyer Road.'"
On 7 April 1988, the defendants moved for summary judgment on all claims. After considering memoranda from both parties and hearing oral argument from counsel on 9 May 1988, the trial court on 24 July 1988 granted the defendants' motion for summary judgment "as to all allegations and matters pertaining to claim or claims relating to ownership of land," denied the defendants' motion for summary judgment on the "alleged assault," and dissolved the preliminary injunction. On 4 August 1988, the plaintiffs gave notice of appeal; on the next day they voluntarily dismissed their claim of assault. Thus the trial court's order of 24 July 1988 as it related to title to Sawyer Road is before this Court.

II
We turn now to the issue on appeal. Plaintiffs argue that the trial court erred in accepting the judgment in the first case as a bar to the second because distinct causes of action were involved. The first action, alleging a trespass committed on 21 August 1984, was grounded alternatively on title acquired by warranty deeds in 1947 and 1948 or on title acquired by adverse possession. The second action, alleging a trespass committed on 13 November 1986, was grounded on title acquired by quitclaim deeds in 1984 and 1985. Plaintiffs assert that the set of facts surrounding each alleged trespass and the cause of action arising from each alleged trespass are separate and independent. Premised on that assertion, plaintiffs contend that the doctrine of res judicata was improperly invoked.
The purpose of res judicata is "to strike a delicate balance between, on the one hand, the interests of the defendant and of the courts in bringing litigation to a close and, on the other, the interest of the plaintiff in the vindication of a just claim." Restatement (Second) of Judgments § 24 Comment b (1982). Our case law has long recognized the balancing function performed by res judicata:
Public policy demands that every person be given an opportunity to have a judicial investigation of the asserted invasion of complainant's rights.... But public policy is equally as adamant in its demand for an end to litigation when complainant has exercised his right and a court of competent jurisdiction has ascertained that the asserted invasion has not occurred.
Crosland-Cullen Co. v. Crosland, 249 N.C. 167, 170, 105 S.E.2d 655, 656 (1958); see also Ludwick v. Penny, 158 N.C. 104, 109, 73 S.E. 228, 231 (1911).
In North Carolina a "final judgment on the merits in a prior action will prevent a second suit based on the same cause of action between the same parties and those in privity with them." Thomas M. McInnis & Assoc., Inc. v. Hall, 318 N.C. 421, 428, 349 S.E.2d 552, 556 (1986). Res judicata operates as a bar not only against matters litigated or determined in the prior proceeding *525 but also against "all material and relevant matters within the scope of the pleadings, which the parties, in the exercise of reasonable diligence, could and should have brought forward." Bruton v. Light Co., 217 N.C. 1, 7, 6 S.E.2d 822, 826 (1940); accord Crump v. Bd. of Education, 93 N.C.App. 168, 177, 378 S.E.2d 32, 36-37 (1989); Thomas M. McInnis & Assoc., Inc. v. Hall, 318 N.C. 421, 428, 349 S.E.2d 552, 556 (1986). Therefore, in the case below the issue is whether all of plaintiffs' claims of title could and should have been adjudicated in the prior case.
In setting the limits of a cause of action, or claim, the Restatement provides that when res judicata bars the plaintiff's claim,
the claim extinguished includes all rights of the plaintiff to remedies against the defendant with respect to all or any part of the transaction, or series of connected transactions, out of which the action arises.
(2) What factual grouping constitutes a "transaction", and what groupings constitute a "series", are to be determined 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). Because the same transaction test produces a broad res judicata effect, it is appropriately applied only when the procedural rules afford parties ample opportunity to litigate, in a single lawsuit, all claims arising from a transaction or series of transactions. Thus, "when the Federal Rules or comparable rules are in force, it is appropriate to define cause of action broadly," as is the current trend. Friedenthal, Kane, and Miller, Civil Procedure § 14.4 (1985). On appropriate facts our courts have applied the same transaction test. See Rodgers Builders v. McQueen, 76 N.C. App. 16, 331 S.E.2d 726 (1985), disc. review denied, 315 N.C. 590, 341 S.E.2d 29 (1986); In re Trucking Co., 285 N.C. 552, 206 S.E.2d 172 (1974); and Taylor v. Electric Membership Corp., 17 N.C.App. 143, 193 S.E.2d 402 (1972).
We hold the case below arose from a single transaction. In both case No. 84CVD41 and case No. 86CVD44 the plaintiffs brought an action in trespass to try title; the same parties and the same parcel of land were involved. The alleged trespasses were distinct in time, but the purpose of plaintiffs' claims was to establish title to Sawyer Road in themselves.
To this end plaintiffs initially alleged record ownership based on warranty deeds of 1948 and 1949; two months later they amended their complaint to allege, in the alternative, ownership by adverse possession. Approximately one month later, in November 1984, plaintiffs bargained for and received a quitclaim deed that purported to convey title to the parcel of land at issue. Approximately eleven months later, in October 1985, plaintiffs acquired another quitclaim deed to the same property. The plaintiffs' first action (case No. 84CVD41) did not come to trial for nearly two years after they obtained the November 1984 deed and nearly one year after they obtained the October 1985 deed. Yet plaintiffs made no attempt to bring forward this evidence of ownership. Instead the quitclaim deeds became the basis for plaintiffs' second action.
It is true, of course, that plaintiffs could not base the first trespass action, filed in August 1984, on record ownership acquired after that date. But plaintiffs, who had already sought equitable relief in the form of an injunction, could have added to their pending lawsuit a claim to quiet title based on the quitclaim deeds.
Any suit to remove a cloud upon title or to quiet title may be brought under N.C. Gen.Stat. § 41-10, which is designed "to establish an easy method of quieting titles of land against adverse claims," Newman Machine Co. v. Newman, 275 N.C. 189, 196, 166 S.E.2d 63, 68 (1969), and is "liberally construed `to advance the remedy and permit the courts to bring the parties to an issue.'" Wachovia Bank & Trust *526 Co. v. Miller, 243 N.C. 1, 5, 89 S.E.2d 765, 768 (1955) (quoting Land Co. v. Lange, 150 N.C. 26, 30, 63 S.E. 164, 166 (1908)); see also York v. Newman, 2 N.C.App. 484, 488, 163 S.E.2d 282, 285 (1968). Where a defendant, as in the case below, claims a right of way over land, the plaintiff may proceed under N.C.Gen.Stat. § 41-10. Cannon v. City of Wilmington, 242 N.C. 711, 714, 89 S.E.2d 595, 597 (1955), cert. denied sub nom, Cannon v. N.C. State Highway Commission, 352 U.S. 842, 77 S.Ct. 66, 1 L.Ed.2d 58 (1956).
In the first action plaintiffs amended their complaint once as a matter of course pursuant to Rule 15(a) of the N.C.Rules of Civil Procedure. At the least they could and should have attempted another amendment to add a quiet title claim. Even before the adoption of our current rules it was permissible "`to introduce a new cause of action by way of amendment if the facts constituting the new cause of action arise out of or are connected with the transactions upon which the original complaint is based.'" Furniture Co. v. Bentwood Co., 267 N.C. 119, 120-21, 147 S.E.2d 612, 613 (1966) (quoting Mica Industries v. Penland, 249 N.C. 602, 606, 107 S.E.2d 120, 124 (1959)). Our rules, modeled on the federal rules, now provide that, in addition to amendments of right, a "party may amend his pleading only by leave of court or by written consent of the adverse party; and leave shall be freely given when justice so requires." Sutton v. Duke, 277 N.C. 94, 101, 176 S.E.2d 161, 163 (1970); N.C.Gen. Stat. § 1A-1, Rule 15(a) (1988). "Leave to amend should be freely given pursuant to N.C.Gen.Stat. § 1A-1, Rule 15. The burden is on the party objecting to the amendment to satisfy the trial court that he would be prejudiced thereby." Saintsing v. Taylor, 57 N.C.App. 467, 471, 291 S.E.2d 880, 882-83, cert. denied, 306 N.C. 558, 294 S.E.2d 224 (1982).
The procedural history of the case below demonstrates that plaintiffs chose not to have all their claims adjudicated in the prior lawsuit. The doctrine of res judicata estops them from litigating any of those claims in a second lawsuit.
The trial court's order of 24 July 1988 is Affirmed.
ARNOLD and BECTON, JJ., concur.
