
955 So.2d 1236 (2007)
In the Interest of D.N.H.W., a child.
N.W.T. and G.S.T., Appellants,
v.
L.H.D. and S.W., Appellees.
Nos. 2D06-5214, 2D06-5425.
District Court of Appeal of Florida, Second District.
May 11, 2007.
*1237 Paul S. Maney of Maney, Damsker, Jones, & Kuhlman, Tampa, for Appellants.
Lorena L. Kiely of Law Office of Lorena L. Kiely, Tampa, for Appellee L.H.D.
No appearance for Appellee S.W.
PER CURIAM.
N.W.T. and G.S.T., the maternal grandparents, appeal two orders of the circuit court determining that Florida has jurisdiction over the custody of their grandchild and granting custody of the child to L.H.D., the child's mother. The grandparents argue that the circuit court did not have subject matter jurisdiction to make an initial custody determination, and we agree.
In July 2004, the grandparents, the mother, and the childwho are all residents of Alabamacame to Florida to stay in the grandparents' vacation home. In August 2004, the mother returned to Alabama, leaving the child with the grandparents. In November 2004, the grandparents filed a petition for dependency in Pinellas County circuit court, seeking temporary custody of the child. The petition alleged that the child "currently resides with the Maternal Grandparents . . . in Pinellas County, Florida" and that the child had resided with such grandparents "since his birth, both in the State of Alabama and Pinellas County, Florida." The Uniform Child Custody Jurisdiction and Enforcement Act (UCCJEA) affidavit filed by the grandparents stated that the child had resided in Pinellas County from "August" to "present." The affidavit did not list any other dates or places of residence.
Shortly thereafter, the grandparents and the mother entered into a joint stipulation agreeing to adjudication of dependency and temporary custody of the child with the grandparents and setting a case plan for the mother. The circuit court adopted the stipulation by order in December 2004. The grandparents returned to Alabama in December 2004.
On September 15, 2006, the circuit court held a hearing and orally ruled that the child should be returned to the custody of the mother. Before the trial court issued a written order reflecting its oral ruling, the grandparents filed a petition for custody of the child in an Alabama circuit court on October 5, 2006. On October 9, 2006, the Florida circuit court signed an order *1238 reflecting its oral rulings at the September 15, 2006, hearing.
On October 26, 2006, the Alabama circuit court entered an order concluding that Alabama was the home state of the child and that Florida never had subject matter jurisdiction over the custody issue. On October 27, 2006, the Alabama circuit court signed a separate order granting the grandparents temporary custody of the child until an evidentiary hearing could be held and enjoining the mother from removing the child from the care and custody of the grandparents.
On November 3, 2006, the mother filed in Florida circuit court a motion for immediate return of the child. Following a hearing, the Florida circuit court signed an order on November 9, 2006, granting the mother's motion. The Florida circuit court ruled that Florida has continuing and exclusive subject matter jurisdiction over the custody of the child.
The grandparents appeal both the October 9, 2006, and the November 9, 2006, orders, claiming that the Florida circuit court did not have subject matter jurisdiction over the custody issue because Florida is not the child's "home state" under section 61.514, Florida Statutes (2004).
In light of the undisputed facts of this case, the issue of whether the Florida circuit court has subject matter jurisdiction under the UCCJEA involves a question of law and is therefore subject to de novo review. See Arjona v. Torres, 941 So.2d 451, 454 (Fla. 3d DCA 2006); Sanchez v. Fernandez, 915 So.2d 192, 192 (Fla. 4th DCA 2005); see also Kephart v. Hadi, 932 So.2d 1086, 1089 (Fla.2006) ("The interpretation of a statute is a purely legal matter and therefore subject to the de novo standard of review."). But see Munnerlyn v. Wingster, 825 So.2d 481, 482 (Fla. 5th DCA 2002) ("A trial court's determination of subject matter jurisdiction is subject to an abuse of discretion standard of review."); Birnbaum v. Birnbaum, 615 So.2d 241, 242 (Fla. 3d DCA 1993) (holding that "the trial court did not abuse its discretion or authority in concluding it was vested with subject matter jurisdiction to proceed on the issue of custody").
"Subject matter jurisdictionthe `power of the trial court to deal with a class of cases to which a particular case belongs'is conferred upon a court by constitution or by statute." Strommen v. Strommen, 927 So.2d 176, 179 (Fla. 2d DCA 2006) (quoting Cunningham v. Standard Guar. Ins. Co., 630 So.2d 179, 181 (Fla.1994)). Parties cannot agree to jurisdiction over the subject matter where none exists, and the defense of lack of subject matter jurisdiction can be raised at any time. Cunningham, 630 So.2d at 181; Strommen, 927 So.2d at 179; Ruble v. Ruble, 884 So.2d 150, 152 (Fla. 2d DCA 2004). "A trial court's lack of subject matter jurisdiction makes its judgments void. . . ." Strommen, 927 So.2d at 179.
Subject matter jurisdiction over child custody matters is governed by the UCCJEA. "The UCCJEA is . . . a jurisdictional act which controls custody disputes." Arjona, 941 So.2d at 454 (emphasis omitted). Section 61.514, titled "Initial child custody jurisdiction," provides in relevant part:
(1) Except as otherwise provided in s. 61.517, a court of this state has jurisdiction to make an initial child custody determination only if:
(a) This state is the home state of the child on the date of the commencement of the proceeding, or was the home state of the child within 6 months before the commencement of the proceeding and the child is absent from this state but a parent or person acting as a parent continues to live in this state. . . .
*1239 "`Home state' means the state in which a child lived with a parent or a person acting as a parent for at least 6 consecutive months immediately before the commencement of a child custody proceeding." § 61.503(7).
On the date the proceeding was commenced in this case, Florida was not the "home state" of the child because the child had not lived in Florida for six consecutive months. Rather, Alabama had jurisdiction to make the initial custody determination pursuant to section 61.514(1)(a) because even though the child was absent from Alabama when the petition for dependency was filed, Alabama had been the home state of the child within six months before the filing of the petition and the mother continued to live in Alabama. See § 61.514(1)(a).[1] Because the Florida circuit court did not have jurisdiction to make an initial custody determination under section 61.514, the orders on appeal are void. See Gonzalez v. Gonzalez, 654 So.2d 257, 259 (Fla. 3d DCA 1995) (holding that portion of final judgment of dissolution of marriage awarding visitation rights with the child to the husband was void because the trial court did not have subject matter jurisdiction).
The mother argues that even if Florida did not have jurisdiction under section 61.514, Florida had jurisdiction under section 61.517, which provides for the exercise of temporary emergency jurisdiction. Section 61.517, titled "Temporary emergency jurisdiction," provides in relevant part:
(1) A court of this state has temporary emergency jurisdiction if the child is present in this state and the child has been abandoned or it is necessary in an emergency to protect the child because the child, or a sibling or parent of the child, is subjected to or threatened with mistreatment or abuse.
(2) If there is no previous child custody determination that is entitled to be enforced under this part, and a child custody proceeding has not been commenced in a court of a state having jurisdiction under ss. 61.514-61.516, a child custody determination made under this section remains in effect until an order is obtained from a court of a state having jurisdiction under ss. 61.514-61.516. If a child custody proceeding has not been or is not commenced in a court of a state having jurisdiction under ss. 61.514-61.516, a child custody determination made under this section becomes a final determination if it so provides and this state becomes the home state of the child.
We agree that the Florida circuit court had temporary jurisdiction to enter the December 2004 order effectively awarding temporary custody to the grandparents under section 61.517. However, that provision did not confer to the Florida circuit court jurisdiction to make an initial custody determination under section 61.514. Any temporary child custody determinations made in this case under section 61.517 remained in effect until the October 27, 2006, order of temporary custody was obtained from the circuit court in Alabama, the state having proper jurisdiction under section 61.514. See § 61.517(2).
Accordingly, we reverse the orders on appeal and remand for entry of an order consistent with this opinion.
Reversed and remanded.
*1240 NORTHCUTT and LaROSE, JJ., and THREADGILL, EDWARD F., Senior Judge, Concur.
NOTES
[1]  Alabama's version of the UCCJEA is essentially identical to Florida's. See Ala.Code §§ 30-3B-201, 30-3B-102 (2004).
