
688 So.2d 856 (1997)
Rachel Loren McBRIDE
v.
Shay Richard McBRIDE.
2950925.
Court of Civil Appeals of Alabama.
January 31, 1997.
*857 Trant Bullard of Bullard & Bullard, Dothan, for Appellant.
Shay R. McBride, pro se.
CRAWLEY, Judge.
The parties were married in Hawaii in 1992. They had a child in 1993, and they separated in 1994, soon after the husband was transferred to Fort Rucker, Alabama. The wife and child moved to Virginia.
In the spring or summer of 1995, the husband filed a petition in a Virginia court for custody or visitation with the child. The wife filed a counterpetition. The husband failed to appear on the date set for a hearing, and the Virginia court dismissed his petition and granted custody of the child to the wife. The Virginia court's order provided that the husband was to have supervised visitation with the child.
On September 6, 1995, the husband filed a complaint for divorce in Alabama. The wife *858 answered and objected to the Alabama court's assuming jurisdiction in the matter of child custody and visitation, arguing that pursuant to the Uniform Child Custody Jurisdiction Act (UCCJA), a Virginia court should decide those issues.
Both parties appeared with counsel at trial. The wife expressed her desire for a divorce but argued that the Alabama court had no jurisdiction to decide matters of custody and visitation. The husband gave testimony relating to the grounds for divorce. No evidence concerning the custody or visitation of the child was presented. At the conclusion of the proceedings, the trial court divorced the parties and divided their property. It awarded custody of the child to the mother and provided for unsupervised visitation by the father. The court stated the following:
"As a result of [my] having, quote, jurisdiction of this case by consent of the parties, I am going to defer any further visitation disputes or disagreements to the Stafford County Commonwealth of Virginia Court for determination."
The last paragraph of the final judgment of divorce states:
"This Court finds that under the Uniform Child Custody Jurisdiction Act, ... the State of Virginia may be a more appropriate forum for the determination of matters relating to the support and custody of the parties' minor child. The child is a resident of the State of Virginia and several of her relatives reside there. It appears that the [father] has voluntarily submitted to jurisdiction there by filing a petition with the District Court of Stafford County, Virginia, concerning the custody of the parties' minor child. Therefore, although this Court has made this Order concerning support and custody of the parties' minor child, this Court will release jurisdiction over any future matters concerning changes of custody, support, or visitation of the parties' minor child to the Stafford County Juvenile and Domestic Relations District Court, Commonwealth of Virginia."
The mother appeals from that portion of the divorce judgment pertaining to custody and visitation, claiming that the Alabama court had no jurisdiction to make a determination as to child custody and visitation. We agree.
Section 30-3-23, Ala.Code 1975, a part of Alabama's version of the UCCJA, provides the following:
"(a) A court of this state which is competent to decide child custody matters has jurisdiction to make a child custody determination by initial or modification decree if:
"(1) This state:
"a. Is the home state of the child at the time of commencement of the proceeding; or
"b. Had been the child's home state within six months before commencement of the proceeding and the child is absent from this state because of his removal or retention by a person claiming his custody or for other reasons, and a parent or person acting as parent continues to live in this state; or
"(2) It is in the best interest of the child that a court of this state assume jurisdiction because:
"a. The child and his parents, or the child and at least one contestant, have a significant connection with this state; and
"b. There is available in this state substantial evidence concerning the child's present or future care, protection, training, and personal relationships; or
"(3) The child is physically present in this state and:
"a. The child has been abandoned;
or
"b. It is necessary in an emergency to protect the child because he has been subjected to or threatened with mistreatment or abuse or is otherwise neglected or dependent; or
"(4) a. It appears that no other state would have jurisdiction under prerequisites substantially in accordance with subdivisions (1), (2), or (3), or another state has declined to exercise jurisdiction on the ground that this state is the more appropriate *859 forum to determine the custody of the child; and
"b. It is in the best interest of the child that a court of this state assume jurisdiction.
"(b) Except under subdivisions (3) and (4) of subsection (a), physical presence in this state of the child, or of the child and one of the contestants, is not alone sufficient to confer jurisdiction on a court of this state to make a child custody determination.
"(c) Physical presence of the child, while desirable, is not a prerequisite for jurisdiction to determine his custody."
Under the UCCJA, there are four bases for exercising jurisdiction: (1) "home state" jurisdiction; (2) "best interest" jurisdiction; (3) "emergency" jurisdiction; and (4) a catchall provision allowing a court to exercise jurisdiction if no other state would have "home state," "best interest," or "emergency" jurisdiction, or if another state with jurisdiction had declined to exercise its jurisdiction. See generally In re Marriage of Schmidt, 436 N.W.2d 99 (Minn.1989).
The Alabama court had no jurisdiction to decide the issues of child custody and visitation under § 30-3-23. The court did not have "home state" jurisdiction, because the minor child resided with the mother in the state of Virginia and had not resided in Alabama for six months before the filing of the complaint for divorce. See § 30-3-23(a)(1)a. and b.
The court did not have "best interest" jurisdiction, because the child did not have a "significant connection with this state," see § 30-3-23(a)(2)a., and there was not "available in this state substantial evidence concerning [her] present or future care, protection, training, and personal relationships," see § 30-3-23(a)(2)b.
The court did not have "emergency" jurisdiction, because the child was not physically present within the state of Alabama. See § 30-3-23(a)(3). Finally, the Alabama court had no jurisdiction under the "catchall" provisions of § 30-3-23(a)(4)a. and b. because the state of Virginia had already exercised its jurisdiction in the matter of custody and visitation.
The trial court recognized, in the last paragraph of its final judgment of divorce, that the state of Virginia was "a more appropriate forum for the determination of matters relating to the support and custody of the parties' minor child." Nevertheless, the trial court made a determination of these matters, apparently because it thought that the parties had "consented" to its exercise of jurisdiction. The provisions of the UCCJA are in the nature of subject matter jurisdiction. Annot., 83 A.L.R.4th 742, 750 (1991). "[S]ubject matter jurisdiction under the UCCJA... cannot be vested by agreement of the parties, even though all of the parties desire an adjudication on the merits." Id. Subject matter jurisdiction cannot be conferred by consent. Payne v. Department of Indus. Relations, 423 So.2d 231, 233 (Ala.Civ. App.1982). See also City of Huntsville v. Miller, 271 Ala. 687, 127 So.2d 606 (1958).
"It would amount to usurpation and oppression for a court to interfere in a matter over which it has no jurisdiction, and its pronouncements in respect thereto would be without force, and its decrees and judgments would be wholly void. This is a universal principle, as old as the law itself; hence the question of jurisdiction is a question of primary importance in every case, and, if there is an absence of jurisdiction over the subject-matter, this ends the inquiry; it cannot be waived or supplied by consent."
Ex parte Tubbs, 585 So.2d 1301, 1302 (Ala.1991)(quoting State v. Albritton, 251 Ala. 422, 424-25, 37 So.2d 640, 642-43 (1948)). "[A] party does not waive the jurisdictional defense by appearing at a hearing on the motion or petition that the party claims to be defective for failure to comply with the UCCJA." Annot., 83 A.L.R.4th at 750.
The UCCJA applies to temporary custody orders such as the order pertaining to custody and visitation entered by the Virginia court in this case. See Annot. 81 A.L.R.4th 1101 (1990). "The [UCCJA] encourages continuing jurisdiction by a court which entered an original custody judgment unless that court presently is without jurisdiction *860 under Section 3 [of the act] or has declined to assume jurisdiction." Pitts v. Sutter, 408 So.2d 105, 110 (Ala.Civ.App.1981), cert. denied, 408 So.2d 114 (Ala.1982).
Those portions of the judgment of divorce relating to child custody and visitation are reversed, and the cause is remanded for proceedings consistent with the principles outlined in this opinion.
REVERSED AND REMANDED.
MONROE and THOMPSON, JJ., concur.
YATES, J., concurs in the result.
ROBERTSON, P.J., dissents.
