Markle, Judge. After the trial court dismissed Jeremy Shawn Emerman’s complaint for divorce from Brooke Emily Hetherington for lack of subject matter jurisdiction, we granted Emerman’s application for discretionary appeal to determine whether the trial court properly granted Hetherington’s motion to dismiss. On appeal, Emerman argues that the trial court failed to accept as true his allegations in the complaint concerning his residency, as it was required to do on a motion to dismiss, and it erred by dismissing the petition without holding an evidentiary hearing. For the following reasons, we vacate the trial court’s dismissal of the complaint, and remand the case with direction for the trial court to conduct an evidentiary hearing. On appeal, we review de novo a trial court’s grant of a motion to dismiss due to lack of subject matter jurisdiction. We also construe the pleadings in the light most favorable to the nonmoving party with any doubts resolved in that party’s favor. (Citations and punctuation omitted.) Douglas County v. Hamilton State Bank, 340 Ga. App. 801, 801-802 (798 SE2d 509) (2017); see also Stillwell v. Topa Ins. Co., Case No. A21A1752, __ Ga. App. __ (__ SE2d __), 2022WL701634, at *2. So viewed, the record shows that Emerman and Hetherington married in Australia in 2017, and separated in July 2020. In October 2020, Emerman filed his divorce complaint in the Superior Court of Coweta County. With respect to residency, Emerman alleged that he was a resident of that county, and had been a resident of the State of Georgia for a continuous period of six months immediately preceding the filing of the complaint. Hetherington filed a special appearance, and moved to dismiss the complaint, alleging, among other things, that the trial court lacked subject matter jurisdiction because Emerman could not prove that he met the sixmonth Georgia residency requirement of OCGA § 1952.[1] Hetherington noted that the parties had never lived in Georgia, and that they last resided together in Scotland from December 2019 until July 2020. The trial court scheduled a hearing on the motion for the limited purpose of receiving argument.[2] Hetherington’s counsel argued that, because Emerman had lived in Scotland until shortly before filing the divorce complaint, he could not meet the sixmonth Georgia residency requirement. Emerman’s counsel, on the other hand, argued that Emerman alleged he resided in Georgia for six months before filing the divorce complaint, and that, when reviewing Hetherington’s motion to dismiss, the trial court must take that allegation as true. Following the hearing, the trial court granted Hetherington’s motion to dismiss, finding that Emerman failed to meet the Georgia residency requirement because he “neither identified nor provided any evidence in support of his claim to be a bona fide resident.” We granted Emerman’s application for discretionary appeal, and this appeal followed.[3] In related enumerations of error, Emerman argues that the trial court erred by failing to either accept as true the allegations of his complaint or permit him to present evidence of his residency. We agree. Under OCGA § 1952, “[n]o court shall grant a divorce to any person who has not been a bona fide resident of this state for six months before the filing of the petition for divorce[.]” The party filing for divorce bears the burden of establishing compliance with the residency requirement, and he may do so by showing that “ he maintained actual residence in Georgia during the relevant time and that he had an intent at that time to remain in Georgia indefinitely.” Black v. Black, 292 Ga. 691, 692 (1) (740 SE2d 613) (2013). If this residency requirement is not satisfied, then the trial court lacks subject matter jurisdiction to grant the divorce. See Crittenden v. Crittenden, 354 Ga. App. 672, 673 (2) (840 SE2d 496) (2020). Here, Emerman alleged that he was a resident of Coweta County and had been for the six months preceding the filing of the divorce complaint. In considering Hetherington’s motion to dismiss for lack of subject matter jurisdiction under OCGA § 9-11-12 (b) (1), the trial court held a hearing on Hetherington’s motion, but it limited the hearing to legal argument only, and did not consider any evidence, and neither party submitted affidavits on the jurisdictional issue. See OCGA § 9-11-43 (b) (“When a motion is based on facts not appearing of record, the court may hear the matter on affidavits presented by the respective parties, but the court may direct that the matter be heard wholly or partly on oral testimony[.]“). The trial court relied on our decisions in Crittenden, 354 Ga. App. 672, and Black, 292 Ga. 691, in finding that Emerman failed to meet his burden of proving his Georgia residency. However, in both of those cases, the trial court held an evidentiary hearing prior to dismissing the petition. Thus, these cases do not support the trial court’s conclusion here. Emerman contends that, if given the opportunity to have an evidentiary hearing, he would have presented testimony and evidence, including his Georgia driver’s license, lease agreement, and rent checks, to satisfy his burden of establishing his Georgia residency. But, because the hearing was limited to legal argument only, Emerman was deprived of his opportunity to prove residency. As such, because the trial court did not allow the parties to present evidence, its factual finding as to Emerman’s residency is premature, as there was no basis for the trial court’s ruling as to Emerman’s residency. See OCGA § 9-11-43 (b). Accordingly, on this record, the trial court erred in dismissing Emerman’s divorce complaint. We therefore vacate the trial court’s order and remand the case for further proceedings consistent with this opinion. Judgment vacated and case remanded with direction. Dillard, P. J., and Mercier, J., concur.