delivered the opinion of the Court.
In this appeal, we consider whether the doctrine of res judicata bars a claim “to recover dower and damages” asserted by a litigant who had unsuccessfully filed a motion for judgment for unlawful detainer.
The parties stipulated the relevant facts. Presley M. Smith and Pauline A. Smith, husband and wife, lived in a residence in Goochland County until Mr. Smith’s death in 1982. Mr. Smith was the sole owner of record of the real property.
Mr. Smith died testate and his will and codicil were probated in November 1982. The will, which was executed in November 1975, devised the residence to Mr. Smith’s sister, Ellen Smith Ware. A codicil, executed in 1979, contained a provision which devised to Mrs. Smith the balance of a debt owed to Mr. Smith if any money *376remained after the estate’s expenses were paid. The expenses exceeded the balance of the debt, and Mrs. Smith received nothing from her husband’s estate.
Mrs. Smith lived in the residence after her husband’s death, but, for a portion of the time, she paid rent to Ware. In April 1988, Ware notified Mrs. Smith that she had to vacate the residence. Mrs. Smith vacated the premises and subsequently filed a motion for judgment for unlawful detainer, seeking possession and damages. The trial court ruled that the unlawful detainer action was barred by the statute of limitations and dismissed the case.
Mrs. Smith then filed a bill of complaint against Ware seeking commutation of her dower interest in the residence and damages for the withholding of her dower interest. Ware filed responsive pleadings and asserted that the doctrine of res judicata barred any recovery. The trial court agreed and dismissed the suit. We awarded Mrs. Smith an appeal.
Mrs. Smith argues that her cause of action is not barred by the doctrine of res judicata. We agree.
The bar of res judicata precludes relitigation of the same cause of action, or any part thereof, which could have been litigated between the same parties and their privies. Bates v. Devers, 214 Va. 667, 670-71, 202 S.E.2d 917, 920-21 (1974). See also Flora, Flora & Montague, Inc. v. Saunders, 235 Va. 306, 310, 367 S.E.2d 493, 495 (1988); Brown v. Haley, 233 Va. 210, 215, 355 S.E.2d 563, 567 (1987); and Worrie v. Boze, 198 Va. 533, 537-38, 95 S.E.2d 192, 196-97 (1956), aff’d on reh’g, 198 Va. 891, 96 S.E.2d 799 (1957). Four elements must be present before res judicata can be asserted to bar a subsequent proceeding: “(1) identity of the remedies sought; (2) identity of the cause of action; (3) identity of the parties; and (4) identity of the quality of the persons for or against whom the claim is made.” Wright v. Castles, 232 Va. 218, 222, 349 S.E.2d 125, 128 (1986). See also Mowry v. City of Virginia Beach, 198 Va. 205, 211, 93 S.E.2d 323, 327 (1956).
We hold that the trial court erred in applying the doctrine of res judicata and dismissing Mrs. Smith’s bill of complaint because there is neither an identity of the remedies sought nor an identity of the causes of action. See Wright, 232 Va. at 222, 349 S.E.2d at 128. Mrs. Smith, in her motion for judgment for unlawful detainer, sought the remedy of possession and damages. We discussed the nature of the remedy in an action for unlawful entry and detainer in Grundy v. Goff, 191 Va. 148, 159, 60 S.E.2d 273, 278 (1950):
*377In Virginia, we have repeatedly held that the design of the action of unlawful entry and detainer is ‘to protect the actual possession, whether rightful or wrongful, against unlawful invasion, and to afford summary redress and restitution. The entry of the owner is unlawful if forcible, and the entry of any other person unlawful, whether forcible or not.’ Judgment only restores the status quo of the parties, and settles nothing as to the title or right of possession.
(Citations omitted). Mrs. Smith, in her bill of complaint, does not seek possession of the property. Rather, she seeks a commutation of her dower interest, which is a different remedy.
The causes of action are also different. Mrs. Smith asserted a right to occupy the property in her motion for judgment for unlawful detainer. There, she relied upon former Code § 64.1-33 1 which permitted a surviving spouse to reside in the marital residence without charge for rent, repairs, taxes, or insurance until dower or curtesy was assigned.1 2 Mrs. Smith, in her bill of complaint, seeks a commutation of her dower interest. She pled a different cause of action, relying upon former Code § 64.1-37, which stated:
A widow having a right to dower in any real estate may recover such dower and damages for its being withheld by such remedy *378at law as would lie on behalf of a tenant for life having a right of entry, or by a bill in equity, when the case is such that a bill would now lie for such dower.
Next, Mrs. Smith argues that the trial court erred in denying her motion for summary judgment because the pleadings established her right to dower. Ware, however, argues that Mrs. Smith is not entitled to summary judgment. Relying on former Code § 64.1-29, Ware contends that Mrs. Smith’s dower interest has been waived by jointure. We disagree with Ware.
Former Code § 64.1-29 stated:
If any estate, real or personal, intended to be in lieu of dower, shall be conveyed, devised or bequeathed for the jointure of the wife, to take effect in profit or possession immediately upon the death of her husband and continue during her life at least, such devise, bequest or conveyance shall bar her dower of the real estate, or the residue thereof, and every such provision, by deed or will, shall be taken to be intended in lieu of dower unless the contrary intention plainly appear in such deed or will or in some other writing signed by the party making the provision.
This code provision has no application here because, as Ware admits in her responsive pleadings, Mrs. Smith received nothing from her husband’s estate immediately upon his death. Thus, applying the plain language of the former statute, Mrs. Smith received no estate, real or personal, in lieu of her dower interest. As we said in McDonald v. McDonald, 169 Va. 752, 759, 194 S.E. 709, 712 (1938), overruled on other grounds, Fuller v. Virginia Trust Co., 183 Va. 704, 713, 33 S.E.2d 201, 205 (1945), “Of course this provision [,the precursor to former Code § 64.1-29,] must be reasonably construed. The estate given must bear some fair relation in value to that of the estate released. No one would contend that a deed to a wife of a cemetery lot would release dower in a valuable estate.”
Next, Ware argues that Mrs. Smith waived her right to dower by executing the lease and paying rent to Ware after Mr. Smith’s death. Relying upon Jordan v. Katz, 89 Va. 628, 16 S.E. 866 (1893), Locke v. Frasher’s Adm’r., 79 Va. 409 (1884), and Emerick v. Tavener, 50 Va. (9 Gratt.) 220 (1852), Ware says that a tenant in possession, *379such as Mrs. Smith, cannot deny the landlord’s title. There is no merit to Ware’s argument.
It is true that we approved the general rule, to which there are exceptions, that a tenant cannot be permitted to question or impugn the title of his landlord, or deny that the possession, so received, was the possession of his landlord. Jordan, 89 Va. at 630-31, 16 S.E. at 867; Locke, 79 Va. at 413; and Emerick, 50 Va. at 223. However, that rule has no application where, as here, the landlord-tenant relationship has ceased to exist.
[T]he tenant may at any time, upon a surrender of his possession to the landlord, deny the landlord’s title from that moment, but he cannot do so as long as he retains such possession. . . .
1 Raleigh C. Minor, The Law of Real Property § 383 (Frederick D.G. Ribble ed. 2d ed. 1928) (emphasis in original). See Emerick, 50 Va. (9 Gratt.) at 223. Mrs. Smith vacated the premises in April 1988 and did not file her bill of complaint until September 1990.
Furthermore, Mrs. Smith does not claim any interest in the residence because of Ware’s title to the property. Rather, Mrs. Smith claims her interest in the property because of her dower right, which gives her an interest in fee simple of one-third of all real estate owned by her deceased spouse during their marriage, as permitted by former Code § 64.1-19.3
We will reverse the judgment of the trial court because the doctrine of res judicata does not bar Mrs. Smith’s claim for dower. We will grant Mrs. Smith’s motion for summary judgment here because the pleadings conclusively establish as a matter of law that she is entitled to her dower interest. We will remand this proceeding for a commutation of her dower interest and a determination of any damages that she may be entitled to recover.
Reversed and remanded.