
856 P.2d 1378 (1993)
In re the MARRIAGE OF Perry Wayne MILLER, Petitioner and Respondent, and
Kathy Jo Miller (Beam), Respondent and Appellant.
No. 92-155.
Supreme Court of Montana.
Submitted on Briefs June 17, 1993.
Decided July 27, 1993.
Rehearing Denied August 26, 1993.
*1379 Patrick F. Flaherty, Great Falls for Appellant.
Dan Falcon, Matteucci, Falcon, Squires & Lester, Great Falls, for respondent.
TRIEWEILER, Justice.
Appellant Kathy Jo Beam appeals from an order issued by the District Court for the Seventeenth Judicial District, Blaine County, in which the court modified the original custody decree and awarded the parties joint custody of their minor child, Lori.
We vacate the order of the District Court on the basis that the court lacked subject matter jurisdiction to modify the original custody decree, and remand to the court for dismissal of this action.
The following issue, raised sua sponte by this Court, is the only issue we find necessary to review:
Did the District Court have jurisdiction under Montana's Uniform Child Custody Jurisdiction Act to hear and determine the motion for modification?
Kathy and Perry Miller were married in October 1980. A son, Joshua, was born in 1981, and a daughter, Lenore (Lori), whose custody is in dispute in this case, was born in June 1982. The marriage broke down, and in August 1982 Kathy and the children *1380 moved to her parent's home in Johnstown, Pennsylvania.
On May 13, 1983, the parties' marriage was dissolved by the Blaine County District Court. The decree provided that the issues of custody and property distribution would be determined at a later date. After the dissolution, Joshua remained in Montana with Perry, and Lori returned to Pennsylvania with Kathy. Lori has lived in Pennsylvania ever since that time.
In 1985, the court entered its findings of fact, conclusions of law, and decree with respect to custody, child support, and distribution of property. Kathy was awarded custody of Lori and Perry was awarded custody of Joshua. This decision was based on the court's findings that neither child had lived with the noncustodial parent since they were infants and that they were each happy and integrated with their respective families.
During the summer of 1990, when Lori was visiting in Montana, Perry petitioned for custody of Lori and obtained a temporary restraining order to keep her from returning to Pennsylvania. These actions were precipitated by Lori's statements that Kathy's live-in boyfriend was abusive to Kathy. Prior to the commencement of Perry's action for modification, Lori had lived in Pennsylvania for approximately eight years, attended school there, and had only visited Perry in Montana for one month in 1988, and two months in 1989.
Hearings were conducted in the Montana court during February 1991. As a result of those hearings, the District Court found that neither Lori nor Kathy were endangered by a live-in boyfriend at that time. The court, therefore, lifted the temporary restraining order. However, the original decree was modified to provide for joint custody of Lori. The court's modification was based on a stipulation which the parties entered into during the hearing.
Kathy sought reconsideration, but her motion was denied and judgment was entered on March 18, 1992. From this judgment, Kathy appeals.
Kathy contends that the court coerced her into entering into the agreement and that it abused its discretion when it modified the 1985 custody decree because the statutory requirements for modification of custody were not satisfied. However, the dispositive issue, which we raise sua sponte, is whether the District Court had subject matter jurisdiction to hear and determine Perry's motion for modification.
It is well established that the issue of subject matter jurisdiction may be raised at any stage of a judicial proceeding by a party or sua sponte by the court. O'Donnell v. Ryans, Inc. (1987), 227 Mont. 48, 49, 736 P.2d 965, 966. See also, State v. Davis (1984), 210 Mont. 28, 30, 681 P.2d 42, 43; State v. Akers (1938), 106 Mont. 43, 57, 74 P.2d 1138, 1145; Oppenheimer v. Regan (1905), 32 Mont. 110, 115, 79 P. 695, 696. Once the issue is raised and it is determined that a court lacks subject matter jurisdiction, the only further action the court can take is to dismiss the case. Rule 12(h)(3), M.R.Civ.P.; In re Marriage of Lance (1984), 213 Mont. 182, 186-87, 690 P.2d 979, 981.
It is also a settled rule that subject matter jurisdiction cannot be waived nor conferred by consent of a party where there is no basis for jurisdiction under the law. O'Donnell, 736 P.2d at 966 (citing State v. Davis, 681 P.2d at 43). Thus, in this instance, Kathy's appearance and participation in the proceedings cannot be construed as an acquiescence in, nor conferral of, subject matter jurisdiction.
All child custody determinations, including initial and modification decrees, are governed by the provisions of Montana's Uniform Child Custody Jurisdiction Act (UCCJA), found at §§ 40-7-101 through -125, MCA. The stated purpose of the UCCJA is to:
[A]ssure that litigation concerning the custody of a child takes place ordinarily *1381 in the state with which the child and his family have the closest connection and where significant evidence concerning his care, protection, training, and personal relationships is most readily available and that courts of this state decline the exercise of jurisdiction when the child and his family have a closer connection with another state.
Section 40-7-102(1)(c), MCA.
Section 40-4-211, MCA, is incorporated into the UCCJA by § 40-7-104, MCA, and is the "premier jurisdictional hurdle which must be overcome before a district court may modify a child custody decree with interstate implications." In re Marriage of Bolton (1984), 212 Mont. 212, 218, 690 P.2d 401, 404. This Court has made clear that the jurisdictional requirements of § 40-4-211, MCA, must be met before a court, which entered an initial custody decree, can exercise continuing subject matter jurisdiction to modify that decree. In re Marriage of Alpert (1993), [258 Mont. 344], 852 P.2d 669, 670-71, 50 St. Rep. 564, 565; Bolton, 690 P.2d at 404. Section 40-4-211, MCA, provides in pertinent part as follows:
(1) A court of this state competent to decide child custody matters has jurisdiction to make a child custody determination by initial or modification decree if:
(a) this state:
(i) is the home state of the child at the time of commencement of the proceedings; or
(ii) had been the child's home state within 6 months before commencement of the proceeding ... or
(b) it is in the best interest of the child that a court of this state assume jurisdiction because:
(i) the child ... and at least one contestant have a significant connection with this state; and
(ii) there is available in this state substantial evidence concerning the child's present or future care, protection, training, and personal relationships; or
(c) the child is physically present in this state and:
(i) has been abandoned; or
(ii) it is necessary in an emergency to protect him because he has been subjected to or threatened with mistreatment or abuse ... or
(d)(i) no other state has jurisdiction under prerequisites substantially in accordance with ... this section or another state has declined to exercise jurisdiction ... and
(ii) it is in his best interest that the court assume jurisdiction.
The record in this case reveals that prior to the commencement of this proceeding Lori lived in Pennsylvania for approximately eight years and only visited Montana during brief periods between 1988 and 1990. Thus, by definition, Montana is not Lori's home state and the court had no jurisdiction under § 40-4-211(1)(a), MCA.
Next, the record demonstrates that Lori's most significant connections are with Pennsylvania, and that is where relevant evidence concerning such things as her medical care, training, personal relationships, and protection is available. Her contacts with Montana at the commencement of the action were minimal, and relevant evidence is virtually non-existent in this State. Therefore, there is no jurisdictional basis under § 40-4-211(1)(b), MCA.
Third, we note that Pennsylvania, which has been Lori's home state since 1982, has adopted the Uniform Child Custody Jurisdiction Act in nearly identical form as Montana. 23 Pa. C.S.A. §§ 5341 through 5366. Because it is both Lori's home state and the state with which she has the most significant connections, Pennsylvania, under its version of the UCCJA, has subject matter jurisdiction to determine custody issues with respect to Lori. Since there is no evidence in the record to suggest that Pennsylvania has declined to exercise its jurisdiction in this instance, § 40-4-211(1)(d), MCA, does not confer jurisdiction on a Montana court.
*1382 Finally, the remaining alternative basis for jurisdiction set forth in § 40-4-211(1)(c), MCA, applies only in cases of abandonment, neglect, or extreme emergency. This Court made clear in Wenz v. Schwartze (1979), 183 Mont. 166, 179, 598 P.2d 1086, 1094, that, consistent with the Commissioners' Notes to the Uniform Child Custody Jurisdiction Act, application of this section requires caution and "is to be used only in `extraordinary circumstances.'" See also, Application of Lang (1959), 193 N.Y.S.2d 763.
The facts of this case do not constitute an extraordinary or emergency situation. Although the modification petition was initiated due to the belief that Kathy was living in an abusive situation and that Lori had been threatened by the same individual, there was no evidence that Lori was in immediate danger. Moreover, by the time of the hearing in 1991, the court found that the situation with Kathy's boyfriend had been "cured" and that it was reasonable to award split physical custody. Thus, the court's own findings negated any argument that there was an emergency situation or necessity to immediately remove Lori from Kathy's custody. Therefore, the section of the UCCJA which confers custody in emergency situations is not applicable here.
After carefully considering the record in this case, we conclude that none of the disjunctive requirements set forth in § 40-4-211, MCA, are satisfied. We hold that the Montana District Court lacked subject matter jurisdiction to intervene in this matter.
Accordingly, the judgment of the District Court is vacated, and pursuant to Rule 12(h)(3), M.R.Civ.P., we remand to the court for dismissal of this action.
TURNAGE, C.J., and HARRISON, HUNT, GRAY and WEBER concur.
NELSON, J., did not participate.
