
736 S.W.2d 927 (1987)
James H. LOGAN and Bonnie H. Logan, Appellants,
v.
FIRST BANK OF HOUSTON, TEXAS, Appellee.
No. 09-86-223 CV.
Court of Appeals of Texas, Beaumont.
September 3, 1987.
Rehearing Denied September 23, 1987.
*928 John E. Wright, Malone, Walsh & Wright, Huntsville, for appellants.
Mike Morris, Tekell, Book, Matthews & Limmer, Houston, for appellee.

OPINION
DIES, Chief Justice.
On September 26, 1975, James H. Logan executed a deed of trust on a 114-acre tract of land in San Jacinto County in favor of First Bank of Houston (Bank) as security for a $300,000 loan. When Logan defaulted on the loan secured by the deed of trust, the trustee began foreclosure proceedings on the property. On January 26, 1979, James H. Logan and Bonnie H. Logan filed suit in Cause Number 6442 seeking to enjoin the foreclosure and set aside the deed of trust. The Logans' original petition in Cause Number 6442 alleged that at the time the deed of trust was executed the property in question was the Logans' homestead and that, therefore, the deed of trust was invalid. The petition in Cause Number 6442 further alleged that the deed of trust was invalid because Bonnie H. Logan had neither signed nor executed it. The petition also contained allegations that the Logans were the owners of the property in fee simple, and that the Bank had unlawfully entered upon the premises, dispossessed the Logans, and was still withholding possession thereof from the Logans to their damage. On September 25, 1979, the Bank filed a counterclaim against the Logans alleging that they had misrepresented to the Bank that the property in question was not their homestead and, therefore, the Bank sought actual and punitive damages under the Texas Business and Commerce Code.
On December 1, 1980, the trial court signed an order dismissing the Logans' suit with prejudice for the sole reason that they had failed to comply with a discovery order previously entered in the cause. The counterclaim filed by the Bank had not been served upon the Logans at the time the dismissal order was signed. On January 28, 1981, the Logans filed another suit, Cause Number 6681, seeking to enjoin the same foreclosure proceeding and to set aside the same deed of trust. The grounds urged by the Logans in Cause Number 6681 were the same as those urged in Cause Number 6442. On March 2, 1981, the trial court dismissed the Logans' suit in Cause Number 6681 with prejudice, dissolved the temporary restraining order, and denied the injunction sought by the Logans. On or about March 3, 1981, the property in issue was sold to the Bank at a public auction pursuant to the provisions of the deed of trust.
On March 2, 1981, the Logans filed another suit, Cause Number 6697, by which they sought to enjoin the foreclosure and set aside the deed of trust. The Logans urged that they had not been given proper notice of the trustee's sale to be conducted on March 3, 1981. The Logans also urged *929 the same grounds they urged in their previous suits. The trial court dismissed the Logans' suit in Cause Number 6697 with prejudice on April 2, 1981, and denied the temporary injunction sought by the Logans.
In September, 1981, the Logans attempted to appeal from the judgment of the trial court in Cause Number 6442. The Bank moved to dismiss the appeal because the appeal bond was not timely filed. This Court granted the Bank's motion and dismissed the Logans' appeal in trial Cause Number 6442 by an opinion issued November 24, 1981. Likewise, Mrs. Logan's attempted appeal by writ of error in trial Cause Number 6697 was dismissed by this Court for want of jurisdiction on November 24, 1981. By the same opinion, this Court dismissed the Logans' appeals from the denial of temporary injunction in five separate suits (which suits included trial Cause Numbers 6442, 6681, and 6697) for lack of appellate jurisdiction. On March 5, 1982, the Supreme Court of Texas refused to grant the Logans' application for writ of error.
On May 21, 1985, the Bank filed suit in trespass to try title against the Logans to recover title and possession of the same property at issue in the prior suits brought by the Logans. The Logans answered by general denial and plea of not guilty. The Logans' answer also alleged that the orders of dismissal with prejudice against their claims in the prior suits barred the instant suit in trespass to try title filed by the Bank.
The Bank filed a motion for summary judgment based upon its title to the property obtained through the substitute trustee's deed dated March 3, 1981, and upon the trial court's dismissal orders entered in the prior suits brought by the Logans. The Bank argued that the Logans should not be allowed to attack the deed of trust and substitute trustee's deed as a matter of law. The Logans filed a written response to the Bank's motion for summary judgment. The Logans also filed a motion for summary judgment.
The Logans' motion for summary judgment was based, in part, on the alleged invalidity of the deed of trust because it was not signed by Mrs. Logan. The Logans' motion was also based on their argument that the dismissal order in Cause Number 6442 was interlocutory because the Bank's counterclaim against the Logans was not dismissed. Furthermore, the Logans' motion urged that if the original dismissal order was not interlocutory, the doctrines of res judicata and collateral estoppel barred the Bank from suing again to obtain relief they had not obtained in the prior actions. The Bank filed a written response to the Logans' motion for summary judgment.
On July 24, 1986, the trial court signed a judgment granting the Bank's motion for summary judgment and denying the Logans' motion. The judgment expressly awarded title and possession of the property in question to the Bank. The Logans have perfected this appeal from the judgment of the trial court.
By their first three points of error the Logans urge that the trial court erred in granting the Bank's motion for summary judgment and that the court erred in refusing to grant the Logans' motion for summary judgment because the record showed that the Bank's suit was barred by the doctrines of res judicata and collateral estoppel. Since the Appellants' brief groups these three points together for argument, we will address them likewise.
Summary judgment should be granted and, if granted, should be affirmed only if the summary judgment proof establishes a right thereto as a matter of law. Gibbs v. General Motors Corp., 450 S.W.2d 827, 828 (Tex.1970). A party may recover in a trespass to try title action if it proves it has superior title from a common source. See TEX.R.CIV.P. 798. Since the summary judgment evidence shows that the Bank obtained its title from Mr. Logan through the deed of trust and the substitute trustee's deed pursuant to the deed of trust, the Bank need not prove how Mr. Logan obtained *930 his title. See American Savings and Loan Ass'n of Houston v. Musick, 517 S.W.2d 627, 630 (Tex.Civ.App.Houston [14th Dist.] 1974), reversed on other grounds, 531 S.W.2d 581 (Tex.1976).
The Logans argue that the doctrines of res judicata and collateral estoppel prevent the Bank from recovering title and possession of the property when it did not obtain such relief in the prior lawsuits filed by the Logans. A judgment rendered in a previous suit between parties to a second suit may be pleaded as res judicata in the second suit when: (1) the first suit was based on the same claim or demand as the second; or, (2) the first suit was not based on the same claim or demand as the second, but it involved the determination of some matter that is in issue in the later suit. 48 TEX.JUR.3d Judgments sec. 351, at 400 (1986). In the first instance the application of res judicata principles is called merger or bar. Id. In the latter case it is referred to as estoppel by judgment or collateral estoppel. Id.
The Logans argue that the present suit by the Bank is an attempt to relitigate issues which were or should have been determined in the suits in which the Bank obtained only dismissals with prejudice against the refiling of further suits by the Logans. The Bank argues that the previous suits in which the Logans' petitions included claims in trespass to try title (trial Cause Numbers 6442 and 6697) should be regarded as suits for cancellation of the deed of trust. Therefore, the Bank argues, the trial court's dismissal orders do not bar its present suit because the issue of title to the property was not before the court in the prior suits. We believe the suits filed by the Logans in trial Cause Numbers 6442 and 6697 were for the purpose of cancelling the deed of trust and that the dismissal orders entered therein do not, therefore, bar the Bank from recovering title in the present suit. See Morris v. Ratliff, 291 S.W.2d 418 (Tex.Civ.App.Dallas 1956, writ ref'd n.r.e.). In this regard we note that the Bank could not have successfully maintained any claim for title to the property at the time these dismissal orders were entered because it did not obtain the substitute trustee's deed until after the dismissals were signed by the trial court. Stated simply, at that time the Bank had no title to the property for anyone to trespass upon.
As to the doctrine of collateral estoppel, the summary judgment proof clearly shows that the trial court never reached the issue of title to the property. Therefore, collateral estoppel does not apply so as to prevent the Bank from recovering title to the property.
We believe the real issue involved in this case is whether a party whose claims are dismissed with prejudice for abuse of the discovery process may raise the same issues he pleaded in the dismissed suit by way of defense in a subsequent suit by the opposing party in the original suit. We believe this is a case of first impression in Texas. The primary purpose of the rules concerning sanctions for the abuse of the discovery process is to ensure compliance with the discovery rules. Bottinelli v. Robinson, 594 S.W.2d 112, 118 (Tex.Civ. App.Houston [1st Dist.] 1979, no writ). However, the sanctions also serve to deter violations of the discovery rules. See National Hockey League v. Metropolitan Hockey Club, Inc., 427 U.S. 639, 643, 96 S.Ct. 2778, 2781, 49 L.Ed.2d 747, 751 (1976). Our rules of civil procedure are to be liberally construed so as to obtain a just, fair, equitable and impartial adjudication of the rights of the parties. TEX.R.CIV.P. 1. Rule 1 indicates that judicial efficiency should also be considered in construing the rules.
The construction of the discovery sanctions rules urged upon us by the Logans would allow a party who had a fair opportunity to present his claims in one suit, and whose cause was dismissed with prejudice for failure to comply with discovery orders, to present those same claims by way of defense in a subsequent suit between the *931 same parties. We believe that the only issue the trial court actually decided in Cause Number 6442 was that the Logans, because of their abuse of the discovery process, should not be allowed to prove their cause of action for the cancellation of the deed of trust. The dismissal with prejudice order constituted a judgment on the merits of the Logans' suit to set aside the deed of trust. See Zimmerman v. Texaco, Inc., 409 S.W.2d 607, 613-614 (Tex.Civ.App. El Paso 1966, writ ref'd n.r.e.). We believe that the sanctions imposed by the trial court would be meaningless if the Logans were allowed to raise the same matters again in this case. We hold that the Logans are estopped from raising any matter pleaded by them in Cause Number 6442 because the trial court's dismissal with prejudice as a discovery sanction was final prior to the judgment in this case being signed. Appellants' first three points of error are, therefore, overruled.
By their fourth point of error, the Logans urge that the trial court erred in entering a writ of possession in favor of the Bank because the trial court had lost jurisdiction of the dismissed causes and the elements for an equitable bill of review were not proved by the Bank. TEX.R. CIV.P. 804 provides that where the plaintiff recovers possession of real property in a trespass to try title action, he is entitled to a writ of possession. Appellants' fourth point of error is overruled.
By their fifth point of error the Logans argue that in awarding possession of the property to the Bank the trial court denied the Logans' right to due process because the court treated the prior dismissal orders as muniments of title. The Logans apparently make this argument because they believe the dismissal with prejudice orders in Cause Number 6442 were necessarily viewed by the trial court as having operated to pass title to the Bank under the rule set out in Hejl v. Wirth, 161 Tex. 609, 343 S.W.2d 226 (1961).
In Hejl, 343 S.W.2d at 226, the Texas Supreme Court held that in a trespass to try title action, "If the plaintiff under the circumstances fails to establish his title, the effect of a judgment of take nothing against him is to vest title in the defendant." If the original suit brought by the Logans (trial Cause Number 6442) was a trespass to try title action, then the Hejl rule might operate so that the Bank acquired title to the property by means of the dismissal with prejudice order entered against the Logans in trial Cause Number 6442. However, as we explained in addressing the Logans' first three points of error, we hold that the original suit (trial Cause Number 6442) was actually not an action in trespass to try title, but rather a suit to set aside the deed of trust. See Morris v. Ratliff, supra, at 420. Therefore, the trial court could not have based its ruling upon the rule in Hejl, supra. Appellants' fifth point of error is overruled. The judgment of the trial court is affirmed.
Affirmed.
