
859 P.2d 1074 (1993)
116 N.M.App. 47
In the Matter of the ADOPTION PETITION OF Lynn Charles WEBBER.
Lynn Charles WEBBER, Petitioner-Appellant,
v.
Kelly E. WEBBER, Respondent-Appellee.
No. 14538.
Court of Appeals of New Mexico.
August 10, 1993.
Certiorari Denied September 22, 1993.
*1075 Michael Newell, Lewis C. Cox, III, Heidel, Samberson & Newell, Lovington, for petitioner-appellant.
M.J. Collopy, Hobbs, for respondent-appellee.

OPINION
BIVINS, Judge.
Lynn Charles Webber (Father) appeals from the order denying his motion for relief from judgment. Father sought relief from the final decree of adoption which declared him to be the adoptive father of the children of Kelly Webber (Mother). On appeal, Father raises the following issues: (1) whether the trial court erred in denying his motion for relief from judgment based on a lack of subject matter jurisdiction over the adoption petition; and (2) whether the trial court erred in denying his motion for relief because Father was not present at the hearing on the adoption petition. We have reviewed Father's arguments and are persuaded that no error occurred. Accordingly, we affirm.

1. Background

Mother and Father were married on July 30, 1985. On February 2, 1986, Father filed a petition to adopt Mother's two minor children. Attached to the petition was the natural father's affidavit and irrevocable consent to adoption. A home study was conducted of the parties to determine whether Father was a suitable candidate for stepparent adoption, and the social worker recommended that the adoption petition be granted. Subsequent to the filing of the adoption petition, but before any hearings were held on the matter, the parties separated and Father took employment out of the country. Despite those events, Father did not withdraw his petition for adoption.
On August 11, 1986, the trial court held a hearing on the adoption petition at which Father's attorney and Mother were present. Father did not attend the hearing and his absence was not explained by his attorney or inquired into by the trial court. On August 12, 1986, the trial court granted Father's petition for adoption and filed a final decree in the matter. Thereafter, the parties were divorced on October 26, 1987.
On July 13, 1992, Father filed a motion for relief from judgment granting his petition for adoption. Father sought to have the final adoption decree set aside on the ground that NMSA 1978, Section 40-7-34(A)(2) (Repl.Pamp. 1989), was not complied with prior to the entry of the decree. Specifically, Father argued that, since the children had not resided with him for at least one year after the parties' marriage and prior to the filing of the petition, the trial court lacked jurisdiction to act on the adoption petition. Therefore, Father requested that the final adoption decree be set aside pursuant to SCRA 1986, 1-060(B)(4) (Repl. 1992), on the ground that the decree was void.
A hearing was held on Father's motion for relief. The trial court found that Father failed to timely exercise his right to attack the final adoption decree. It concluded that the adoption proceedings were conducted in strict compliance with the provisions *1076 of the Adoption Act, NMSA 1978, Sections 40-7-29 to -61 (Repl.Pamp. 1989). The trial court also concluded that it had personal and subject matter jurisdiction over the proceedings at the time the final adoption decree was entered, and that the decree was not subject to direct or collateral attack by Father. Based on its findings of fact and conclusions of law, the trial court denied Father's motion for relief from judgment. This appeal followed.

2. Jurisdiction

Father first argues that it was error to deny his motion for relief from judgment since the trial court lacked jurisdiction to enter the final decree of adoption. Father argues that the one-year stepparent residency provision, set forth in Section 40-7-34(A)(2), is a jurisdictional requirement for a stepparent adoption.
Section 40-7-34(A)(2) provides that the usual home placement procedure is not applicable if the child is to be adopted by a stepparent and "if, prior to the filing of the [adoption] petition, the child has resided with the stepparent for at least one year since the marriage of the stepparent to the natural parent." As noted earlier, the parties were married in July 1985 and Father filed his petition for adoption in February 1986. Since the one-year residency was not complied with, Father argues the trial court lacked jurisdiction to grant the petition.
We do not agree with Father that the one-year residency provision for stepparent adoptions is jurisdictional in nature. Rather, we view it as a statutory prerequisite to stepparent adoption and a safeguard to ensure that the best interests of the child are met by allowing the adoption. See generally In re Adoption of Doe, 101 N.M. 34, 37, 677 P.2d 1070, 1073 (Ct.App.) (primary purpose of adoption is protection and promotion of child's best interests), cert. denied, 101 N.M. 11, 677 P.2d 624 (1984). Despite the fact that Father had not resided with the children for one year after the parties' marriage prior to filing the petition, there was evidence before the trial court on which it could reasonably determine that the best interests of the children were being promoted and protected by granting Father's adoption petition. Specifically, the home study conducted of the parties found Father to be a suitable stepparent and recommended the granting of his adoption petition.
By arguing that the Adoption Act is in derogation of common law and, therefore, must be strictly followed, see In re Adoption of Bradfield, 97 N.M. 611, 614, 642 P.2d 214, 217 (Ct.App. 1982), Father's jurisdictional argument is similar to one recently rejected by our Supreme Court. In Sundance Mechanical & Utility Corp. v. Atlas, 109 N.M. 683, 789 P.2d 1250 (1990), the Court was dealing with two homeowners' claim that the trial court lacked jurisdiction to entertain a subcontractor's claim for foreclosure of his mechanic's lien and to award a default judgment on that claim. The Supreme Court characterized the homeowners' argument as alleging "that where a statute, already in derogation of the common law, governs the validity or invalidity of a claim, the court's `power or authority' to determine the claim depends on there being a valid claim in the first instance." Id. at 687, 789 P.2d at 1254. In rejecting this argument, the Court stated that allowing such an approach "would make jurisdiction turn on the underlying validity vel non of a claim  the very question to be determined by the court in the exercise of its jurisdiction." Id.
Father's argument also is similar to an argument made by the appellant in In re Adoption of Matthew B.-M., 232 Cal. App.3d 1239, 284 Cal. Rptr. 18 (1991), cert. denied, ___ U.S. ___, 112 S.Ct. 1685, 118 L.Ed.2d 400 (1992). In that case, the natural mother appealed the trial court's denial of her motion to vacate a judgment of paternity. The natural mother made this motion after she had acted as a surrogate mother for the natural father and his wife and after the trial court had adjudged the natural father to be the legally-recognized natural father. One of the natural mother's arguments on appeal was that the trial court did not have subject matter jurisdiction over the natural father's paternity action. *1077 This argument was based on the natural mother's claim that the trial court's judgment of paternity was contrary to a California statute barring a semen donor from being treated in law as a natural father. The California Court of Appeal answered the natural mother's argument in the following way:
However, [the natural mother's] argument confuses errors that exceed a trial court's jurisdiction with errors of substantive law that are within its jurisdiction. Jurisdiction is the power to hear and determine a matter and is not at all dependent upon the judge's ability to reason correctly or to act incorruptibly. While parties may collaterally attack judgments for lack of personal or subject matter jurisdiction or for granting relief that the court had no power to grant, they may not collaterally attack nonjurisdictional errors. Therefore, absent reversal on appeal, a judgment is valid and conclusive, even if contrary to statute, so long as the court had jurisdiction over the parties and power under the Constitution to deal with the subject matter. (Citations and footnote omitted, and emphasis added.)
Id., 284 Cal. Rptr. at 33.
Father here argues that, because his petition for adoption should have been denied for lack of a statutory prerequisite, the trial court was deprived of subject matter jurisdiction. However valid Father's argument for denial of the petition may be, his argument goes to the merits of the court's ultimate decision, not to whether the court had the power to engage in the decision-making process in the first place. "[T]he jurisdiction of a district court does not depend on how the court decides a contested issue submitted to it; the test `is whether or not it had power to enter upon the inquiry; not whether its conclusion * * * was right or wrong.'" Sundance, 109 N.M. at 687, 789 P.2d at 1254 (quoting State v. Patten, 41 N.M. 395, 399, 69 P.2d 931, 933 (1937)).
Father cites to Heirich v. Howe, 50 N.M. 90, 171 P.2d 312 (1946), as support for his argument that the one-year stepparent residency provision is jurisdictional in nature. However, that case merely determined that the jurisdiction of the trial court to grant adoption decrees was limited to proceedings instituted by New Mexico residents. See id. at 94-95, 171 P.2d at 315-316. This is consistent with Section 40-7-33(B), which allows only New Mexico residents to adopt under the New Mexico Adoption Act. Under the facts of this case, there is no question that Father was a resident of the state at the time he filed his petition for adoption.
Having concluded that the one-year residency provision for stepparent adoptions is not jurisdictional, we also conclude that the trial court did not err in denying Father's motion for relief from judgment. Section 40-7-51(F) provides in pertinent part that "[a] final decree of adoption may not be attacked upon the expiration of one year from the entry of the decree." This time limitation on the right to attack an adoption decree conforms with the legislature's determination that adopted children should be placed in the same legal position and receive the same consideration as children begotten by marriage. See generally § 40-7-52; Hahn v. Sorgen, 50 N.M. 83, 171 P.2d 308 (1946). By statutorily placing a definite time limitation for attacking adoption decrees, we believe the legislature intended to ensure that adopted children were given status equal to that of children begotten by marriage. We also view the one-year limitation as being consistent with the interest in maintaining the finality of judgments. See Phelps Dodge Corp. v. Guerra, 92 N.M. 47, 50, 582 P.2d 819, 822 (1978).
Father's motion for relief from judgment was filed more than five years after the final decree of adoption was entered. Therefore, Father is time-barred from attacking the adoption decree. See § 40-7-51(F).

3. Father's Absence at Hearing

Father next argues that the trial court erred in denying his motion for relief from judgment because he was not present *1078 at the hearing on the adoption petition. Again, we do not agree. A review of the hearing on the adoption petition reveals that Father's attorney was present. Furthermore, there is no requirement in the Adoption Act that both parties be physically present in order for the trial court to act on an adoption petition. Finally, as we noted earlier, Father failed to attack the adoption decree within the statutorily allotted time period of one year. See id. In light of the foregoing, we affirm on this issue.
Based on the above, the trial court is affirmed.
IT IS SO ORDERED.
MINZNER, C.J., and PICKARD, J., concur.
