
479 S.E.2d 540 (1997)
23 Va. App. 708
Arthur O. ROGERS
v.
Nora Katherine Rogers DAMRON.
Record No. 0808-96-3.
Court of Appeals of Virginia, Salem.
January 14, 1997.
Thomas P. Walk, Tazewell (Altizer, Walk & White, on briefs), for appellant.
James R. Henderson IV, Tazewell (Felicia H. de Courcy; Henderson and de Courcy, on brief), for appellee.
Present: MOON, C.J., and ELDER and BRAY, JJ.
*541 ELDER, Judge.
Arthur O. Rogers (husband) appeals from a decision of the Circuit Court of Tazewell County (trial court) denying his motions to vacate an order finding him in contempt, to quash a capias, and to declare void a prior decree incorporating a settlement agreement. He contends that the trial court lacked jurisdiction to institute a contempt proceeding against him because the court order on which the contempt proceeding was based was void. For the reasons that follow, we affirm.

I.

FACTS
Husband and Nora Katherine Rogers Damron (wife) were married in 1960, and husband filed for divorce in 1979. Wife filed an answer and cross bill requesting, among other things, spousal support. On April 23, 1981, the trial court granted husband a divorce a vinculo matrimonii. In the decree, the trial court reserved jurisdiction over spousal support and property issues by stating:
It is further ORDERED, ADJUDGED and DECREED that this Court retain jurisdiction of this case for the purpose of adjudicating and determining all the rights of the wife for spousal support and property rights existing between the parties until such property rights and rights to spousal support are fully considered and determined.
On July 17, 1981, the parties entered into a settlement agreement. Under the agreement, husband agreed to transfer certain property to wife, to make annual payments to wife over a ten-year period, to pay specified debts, and to obtain a term life insurance policy as security for his obligations under the agreement. Wife agreed "to release and discharge ... all [of her] interest by dower and any and all claims which she may or might have for alimony and for support and maintenance for herself or otherwise." On November 4, 1981, the trial court entered a decree that ratified and incorporated the agreement between the parties (settlement decree).
In 1986, wife began contempt proceedings to enforce the terms of the settlement decree. On April 23, 1993, the trial court found that husband was in arrears in the payment of his obligations under the settlement decree. It held that husband was in contempt of court and ordered the issuance of a capias for his arrest.
On November 22, 1994, husband filed motions to quash the capias, to vacate the finding of contempt and to void the settlement decree. The trial court denied husband's motions.

II.

VALIDITY OF THE 1981 SETTLEMENT DECREE
Husband contends that the trial court erred when it denied his motions because the 1981 settlement decree enforced by the trial court was void. We disagree.
A decree is void ab initio if it "has been procured by extrinsic or collateral fraud, or entered by a court that did not have jurisdiction over the subject matter of the parties." Rook v. Rook, 233 Va. 92, 95, 353 S.E.2d 756, 758 (1987). A void judgment may be attacked collaterally or directly in any court at any time. Id.
Husband's attack on the 1981 settlement decree is based solely on his contention that the trial court lacked subject matter jurisdiction to incorporate the settlement agreement into the decree. Subject matter jurisdiction may be fixed only by the constitution or a statute, and it may not be conferred upon a court by the consent of the parties. See Barnes v. American Fertilizer Co., 144 Va. 692, 705-06, 130 S.E. 902, 906 (1925). In Virginia, jurisdiction over divorce matters is statutorily-based. See Lapidus v. Lapidus, 226 Va. 575, 578, 311 S.E.2d 786, 788 (1984). A court has jurisdiction over the subject matter if it has jurisdiction over the cause of action and of the relief sought. See Nolde Bros. v. Chalkley, 184 Va. 553, 561, 35 S.E.2d 827, 830 (1945).
Husband does not argue that the trial court lacked jurisdiction over the cause *542 of action in this case.[1] Instead, husband contends that the 1981 settlement decree is void because the trial court lacked jurisdiction to grant the relief sought by wife: the incorporation of the settlement agreement in a decree issued after the entry of the divorce decree.[2] Husband relies on the language of the 1981 version of Code § 20-109.1 stating that a divorce court may incorporate a settlement agreement "by reference in its... decree of divorce...." (1975 & Supp. 1980).[3] Husband argues that the plain meaning of Code § 20-109.1 in 1981 divested the trial court of its subject matter jurisdiction to incorporate settlement agreements after the decree of divorce became final. We disagree.
We hold that the 1981 version of Code § 20-109.1 did not deprive the trial court of its power to incorporate a settlement agreement in a decree following the entry of a decree of divorce and that the 1981 settlement decree is not void for lack of subject matter jurisdiction. Both the legal framework on which Code § 20-109.1 was grafted and the purpose of Code § 20-109.1 support this conclusion.
First, Code § 20-109.1 was not intended to alter the divorce court's power that existed prior to the statute's enactment to incorporate settlement agreements into its decrees. Before Code § 20-109.1 was enacted in 1970, a divorce court had an "incidental authority to approve bona fide and valid agreements between the parties for the settlement of property rights and claims for [support]." Barnes, 144 Va. at 710, 714, 130 S.E. at 907, 909 (holding that a trial court has a right to set forth in its decrees a settlement agreement entered between the parties in a divorce proceeding). This incidental authority of a divorce court extended to the enforcement of the agreement through its contempt power if the court had incorporated the terms of the settlement agreement instead of merely ratifying them. See Gloth v. Gloth, 154 Va. 511, 548, 153 S.E. 879, 891 (1930) (stating that a trial court has jurisdiction in a divorce suit to enforce the terms of a settlement agreement when it incorporates them *543 in its decree); see also Casilear v. Casilear, 168 Va. 46, 55, 190 S.E. 314, 318 (1937) (stating that a trial court retains jurisdiction after a final decree of divorce to enforce agreements between the parties); McLoughlin v. McLoughlin, 211 Va. 365, 368, 177 S.E.2d 781, 783 (1970) (stating that prior to the enactment of Code § 20-109.1, the incorporation of a settlement agreement "meant the court could use its contempt power to enforce the agreement"). Soon after the enactment of Code § 20-109.1, the Virginia Supreme Court stated that this statute merely codified the preexisting power of a divorce court to incorporate a settlement agreement in a decree and to enforce it through its contempt power. See McLoughlin, 211 Va. at 368, n. 1, 177 S.E.2d at 783, n. 1.
In addition, the conclusion that a divorce court may in a bifurcated proceeding incorporate a settlement agreement following the entry of a decree of divorce is consistent with the purpose of Code § 20-109.1. "The primary objective of statutory construction is to ascertain and give effect to legislative intent." Turner v. Commonwealth, 226 Va. 456, 459, 309 S.E.2d 337, 338 (1983). A statute is construed "to promote the end for which it was enacted." Woolfolk v. Commonwealth, 18 Va.App. 840, 847, 447 S.E.2d 530, 533 (1994). The purpose of Code § 20-109.1 is to encourage dispute resolution and the formation of settlement agreements in divorce proceedings by facilitating their enforcement "by the contempt power of the court." Morris v. Morris, 216 Va. 457, 459, 219 S.E.2d 864, 866-67 (1975). When it enacted Code § 20-109.1, the General Assembly was presumably aware of a divorce court's inherent equity power to adjudicate separately the issues associated with a divorce. See Morris v. Morris, 3 Va.App. 303, 306, 349 S.E.2d 661, 662-63 (1986) (holding that trial court has inherent equity power to reserve jurisdiction over attorney's fees, spousal support, custody, and equitable distribution after entry of divorce decree) (citing Brinn v. Brinn, 147 Va. 277, 285, 137 S.E. 503, 505 (1927)); see also cases cited in supra note 1. In a bifurcated divorce proceeding, the only construction of Code § 20-109.1 that promotes the statute's purpose is one that permits a divorce court to incorporate settlement agreements after the entry of a divorce decree. When a divorce court decrees a divorce while reserving consideration of support, custody, or property issues, it provides the parties with additional time to resolve their differences. In these circumstances, a divorce court must possess the power to incorporate in a subsequent decree, rather than merely ratify, any settlement negotiated by the parties in order to facilitate the trial court's enforcement of such agreements through the contempt power of the court.
For the foregoing reasons, we affirm the trial court's denial of husband's motions to vacate the order finding him in contempt, to quash the capias and to declare void the 1981 settlement decree.
Affirmed.
NOTES
[1]  In 1981, the trial court had jurisdiction over suits for divorce and the adjudication of related support, custody and property issues. Code §§ 20-96, 20-107 (1975 & Supp.1980). In addition, the court properly used its inherent equity power to bifurcate the divorce proceeding when it expressly reserved its consideration of the spousal support and property issues beyond the entry of the divorce decree. See Erickson-Dickson v. Erickson-Dickson, 12 Va.App. 381, 388, 404 S.E.2d 388, 392 (1991) (stating that "when a court acquires jurisdiction over the subject matter and over the person, the court retains jurisdiction until the matter before it has been fully adjudicated"); Morris v. Morris, 3 Va.App. 303, 306, 349 S.E.2d 661, 662-63 (1986) (holding that trial court had power to reserve jurisdiction over attorney's fees, spousal support, custody, and equitable distribution after entry of divorce decree); Parra v. Parra, 1 Va.App. 118, 127, 336 S.E.2d 157, 161-62 (1985) (stating that once subject matter jurisdiction attaches, only a statute can prevent a trial court from using its inherent powers in equity); Brinn v. Brinn, 147 Va. 277, 285, 137 S.E. 503, 505 (1927) (describing inherent equity powers of a court of chancery).
[2]  We disagree with wife's argument that the power of a divorce court to incorporate a settlement agreement is a procedural matter rather than an issue of subject matter jurisdiction. Subject matter jurisdiction encompasses both jurisdiction over the cause of action and the power to grant the relief sought. See Nolde Bros., 184 Va. at 561, 35 S.E.2d at 830. Wife's reliance on Morrison v. Bestler is misplaced. 239 Va. 166, 387 S.E.2d 753 (1990). In Morrison, the Virginia Supreme Court held that compliance with the notice requirement and waiting period associated with a medical malpractice tort claim was not an issue of subject matter jurisdiction. 239 Va. at 173, 387 S.E.2d at 757-58. However, unlike the issue in this case, these procedural matters concern neither the court's underlying grant of jurisdiction to adjudicate tort claims nor the court's power to grant the relief sought in such cases: money damages. The issue in this case, on the other hand, centers on the power of the trial court to incorporate a settlement agreement into a post-divorce decree at the request of a party, which was the relief sought by wife in November, 1981. Thus, husband's appeal attacks the settlement decree for lack of subject matter jurisdiction, an issue that may be raised at any time.
[3]  In 1981, Code § 20-109.1 stated in relevant part:

Any court may affirm, ratify and incorporate by reference in its ... decree of divorce whether from the bond of matrimony or from bed and board, any valid agreement between the parties, or provisions thereof, concerning conditions of the maintenance of the parties, or either of them and the care, custody and maintenance of their minor children, or establishing or imposing any other condition or consideration, monetary or nonmonetary....
(1975 & Supp.1980).
