
353 S.E.2d 756 (1987)
Lisbeth L. ROOK
v.
Robert D. ROOK.
Record No. 831780.
Supreme Court of Virginia.
March 6, 1987.
*757 Jonathan C. Thacher, Fairfax, for appellant.
Carl P. Horton, Oakton, for appellee.
Present: All the Justices.
STEPHENSON, Justice.
In this appeal from a decree declaring a property settlement agreement void, the dispositive issue is whether the trial court had jurisdiction.
On December 11, 1980, Robert and Lisbeth Rook executed a property settlement agreement in contemplation of a separation. On January 21, 1982, Robert filed a bill of complaint against Lisbeth alleging that the parties had lived separate and apart without cohabitation or interruption since December 23, 1980. He prayed for a divorce a vinculo matrimonii on the ground of one-year separation without any cohabitation and without interruption and for incorporation of the property settlement agreement into the divorce decree. On April 16, 1982, the trial court granted an absolute divorce based on the one-year separation and incorporated the property settlement agreement into its decree pursuant to Code § 20-109.1.
In October 1982, Lisbeth initiated a proceeding requiring Robert to show cause why he should not be held in contempt of court for failing to abide by the terms of the property settlement agreement. In defense of the contempt proceeding, Robert contended that the property settlement agreement was void ab initio and unenforceable because it was against public policy in that it facilitated separation and divorce. The court, by decree entered August 12, 1983, ruled that the agreement was "invalid and unenforceable as void against public policy." Lisbeth appeals from this decree.
Lisbeth's first assignment of error challenges the jurisdiction of the trial court to modify the divorce decree after it became final.[1] Robert counters with alternative arguments. First, he argues that he did not attack the decree but only the property settlement agreement.[2] Alternatively, he argues that even if his claim constituted an attack on the final decree, Code § 8.01-428(C)[3] permits such a challenge.
We disagree with Robert's first argument and conclude that under the facts of this case Robert has attacked the decree and not merely the property settlement agreement. The trial court incorporated the agreement into the decree pursuant to the provisions of Code § 20-109.1. Code § 20-109.1 provides that "[w]here the court affirms, ratifies and incorporates by reference in its decree such agreement ..., it shall be deemed for all purposes to be a term of the decree, and enforceable in the same manner as any provision of such decree."
Robert's reliance upon Code § 8.01-428(C) in his second argument is misplaced. That section specifies the use of "an independent action" to challenge a judgment or decree. Byrum v. Lowe & Gordon, 225 Va. 362, 365-66, 302 S.E.2d 46, 48, cert. denied, 464 U.S. 961, 104 S.Ct. 394, 78 L.Ed.2d 337 (1983). Robert, however, asserted his claim as a defense to a contempt proceeding in the divorce case. This is not *758 an independent action as contemplated by Code § 8.01-428(C).
Next, we consider the application of Rule 1:1, relied upon by Lisbeth, which provides in pertinent part:
All final judgments, orders, and decrees, irrespective of terms of court, shall remain under the control of the trial court and subject to be modified, vacated, or suspended for twenty-one days after the date of entry, and no longer.
The Rule is clear. After the expiration of 21 days from the entry of a judgment, the court rendering the judgment loses jurisdiction of the case, and, absent a perfected appeal, the judgment is final and conclusive. Hirschkop v. Commonwealth, 209 Va. 678, 679-80, 166 S.E.2d 322, 323-24, cert. denied, 396 U.S. 845, 90 S.Ct. 72, 24 L.Ed.2d 94 (1969); Martin Thomas Smith v. Commonwealth, 207 Va. 459, 465-67, 150 S.E.2d 545, 549-50 (1966); John Lewis Smith v. Commonwealth, 195 Va. 297, 301, 77 S.E.2d 860, 862 (1953).
Judgments that are void, however, may be attacked in any court at any time, directly or collaterally, and thus are not encompassed by Rule 1:1. A void judgment is one that has been procured by extrinsic or collateral fraud, Jones v. Willard, 224 Va. 602, 607, 299 S.E.2d 504, 508 (1983); Rowe v. Coal Corp., 197 Va. 136, 143, 87 S.E.2d 763, 767-68 (1955); O'Neill v. Cole, 194 Va. 50, 56-57, 72 S.E.2d 382, 385-86 (1952); McClung v. Folks, 126 Va. 259, 268-73, 101 S.E. 345, 347-49 (1919), or entered by a court that did not have jurisdiction over the subject matter or the parties, Va. Dept. Corr. v. Crowley, 227 Va. 254, 260-61, 316 S.E.2d 439, 442-43 (1984); Slaughter v. Commonwealth, 222 Va. 787, 791, 284 S.E.2d 824, 826 (1981); Matthews v. Commonwealth, 216 Va. 358, 359-61, 218 S.E.2d 538, 539-40 (1975); Cofer v. Cofer, 205 Va. 834, 836-37, 140 S.E.2d 663, 665-66 (1965).
In the present case, Robert does not contend that the divorce decree was procured by extrinsic or collateral fraud. Indeed, the record discloses that he asked for the entry of the decree which incorporated the agreement. His sole contention is that the agreement is against public policy and therefore void. This challenge to the agreement's validity could and should have been raised before the divorce decree was entered or within 21 days thereafter.
Additionally, the record discloses that the court had jurisdiction of the subject matter and the parties when it entered the divorce decree. Thus, the divorce decree was not void for lack of jurisdiction.
After the expiration of 21 days from the date the decree was entered, the trial court lost jurisdiction of the case, except for the limited purposes of revising child custody and support, Code § 20-108, and exercising its enforcement powers. We hold, therefore, that the trial court erred in modifying the divorce decree by declaring the incorporated property settlement agreement invalid.
Accordingly, we will reverse and vacate the decree entered by the trial court on August 12, 1983, reinstate the decree entered April 16, 1982, and remand the cause for further proceedings consistent with the views expressed herein.
Reversed and remanded.
NOTES
[1]  Because of the result we reach on the jurisdictional question, we cannot address Lisbeth's other assignments of error.
[2]  Relying on Camp v. Bruce, 96 Va. 521, 31 S.E. 901 (1898), Robert argues that a contract void for illegality can be attacked at any time the illegality appears. Camp, however, has no application to the facts of this case because Robert did not appeal from the divorce decree.
[3]  Subsection C of Code § 8.01-428 reads as follows:

C. Other judgments or proceedings.  This section does not limit the power of the court to entertain at any time an independent action to relieve a party from any judgment or proceeding, or to grant relief to a defendant not served with process as provided in § 8.01-322, or to set aside a judgment or decree for fraud upon the court.
