
840 A.2d 708 (2004)
2004 ME 4
Pamela FRANCIS
v.
Colleen DANA-CUMMINGS
v.
Pleasant Point Passamaquoddy Housing Authority.
Supreme Judicial Court of Maine.
Argued: October 15, 2003.
Decided: January 6, 2004.
Curtis Webber (orally), Linnell, Choate & Webber, LLP, Auburn, for plaintiff.
*709 Kaighn Smith Jr. (orally), Melissa A. Hewey, Drummond Woodsum & MacMahon, Portland, for Pleasant Point Passamaquoddy Housing Authority.
Norman P. Toffolon, Machias, for Colleen Dana-Cummings.
Panel: SAUFLEY, C.J., and CLIFFORD, RUDMAN, DANA, ALEXANDER, and LEVY, JJ.
RUDMAN, J.
[¶ 1] Pamela Francis appeals from a judgment entered in the Superior Court (Washington County, Mead, J.) dismissing her three-count complaint against Colleen Dana-Cummings alleging (1) a violation of the Maine Civil Rights Act; (2) trespass; and (3) illegal eviction. Francis asserts that the trial court erred in ruling that the litigation involved an "internal tribal matter." Because the complaint sets forth a cause of action on all three counts, and because the record is not sufficient to support a determination that the dispute is an internal tribal matter, we vacate the judgment.

I. BACKGROUND
[¶ 2] In her complaint, Francis alleges the following: She is a member of the Passamaquoddy Indian Tribe, presently living in Old Orchard Beach, and is the owner of a private residence located on the Pleasant Point Passamaquoddy Reservation.
[¶ 3] Dana-Cummings is a former Executive Director of the Pleasant Point Passamaquoddy Housing Authority. On February 24, 1998, without prior notice to Francis, Dana-Cummings directed several employees of the Authority to break into the residence, remove the furnishings, change the locks, and place a sign on the door stating that the residence was the property of the Authority.
[¶ 4] At that time, Ralph Dana, who was occupying the residence as a caretaker, contacted Dana-Cummings and asked her to stop the break-in. Dana-Cummings, in response to Dana's request, conceded that she did not have authority to evict Francis in this manner and that she had not given Francis notice, but refused to instruct the employees to cease, and ordered Dana to leave the premises.
[¶ 5] Under the instruction of Dana-Cummings, the Authority's employees broke Francis's door and removed many of her household furnishings. Most of her belongings were later returned, but some of them were returned damaged or destroyed.
[¶ 6] Francis alleges that she suffered a loss of income, inconvenience, expense, and emotional distress as a result of the breakin.
[¶ 7] Francis filed a three-count complaint against Dana-Cummings, alleging civil rights violations,[1] trespass,[2] and illegal eviction.[3] Dana-Cummings answered denying the allegations of the conduct, and filed a third-party complaint against the Authority. The Authority moved to dismiss the third-party complaint, or, in the alternative, stay the proceeding pending resolution of a parallel case in the Passamaquoddy Tribal Court. The trial court granted the Authority's motion to dismiss the third-party complaint and, sua sponte, dismissed the underlying complaint, for failure to state a claim and for lack of subject matter jurisdiction.
*710 [¶ 8] Francis appealed, challenging the dismissal of her complaint against Dana-Cummings.[4] The parties do not challenge the dismissal of the third-party complaint against the Authority, nor have the parties asserted that our state court is a forum non conveniens.

II. DISCUSSION
[¶ 9] Because this matter was treated by the trial court as a motion to dismiss, testing the sufficiency of the complaint, we review the Superior Court's judgment based solely on the facts as they are alleged by Francis, recognizing that Dana-Cummings disputes those allegations. See In re Wage Payment Litig., 2000 ME 162, ¶ 3, 759 A.2d 217, 220. The trial court dismissed the complaint on the grounds that (1) it did not have jurisdiction to hear the claim, and (2) the complaint did not state a claim for which relief could be granted. We review each of these grounds in turn.

A. Subject Matter Jurisdiction
[¶ 10] Francis contends that the trial court erred in determining that the dispute involves an internal tribal matter. The phrase "internal tribal matter" comes from the Maine Indian Claims Settlement Act, 30 M.R.S.A. §§ 6201-6214 (1996 & Supp.2003). The Settlement Act provides that "internal tribal matters . . . shall not be subject to regulation by the State." 30 M.R.S.A. § 6206(1) (1996). As we have recently emphasized, "[t]here is no question that the state may not interfere with internal tribal matters." Great N. Paper, Inc. v. Penobscot Nation, 2001 ME 68, ¶ 46, 770 A.2d 574, 588.
[¶ 11] According to the trial court, the dispute between Francis and Dana-Cummings "involves two tribal members," and the "subject matter is tribal law and policy regarding various property issues." The record, however, is not sufficiently developed to allow the trial court to make that determination.
[¶ 12] In her complaint, Francis alleges that she is a member of the Passamaquoddy Tribe. She does not make a similar allegation regarding Dana-Cummings. Rather, she alleges that Dana-Cummings is a resident of the Pleasant Point Passamaquoddy Reservation. In her answer, Dana-Cummings denies this, averring specifically that she lives in Eastport, and also denies that Francis is a member of the Tribe. Neither Francis nor Dana-Cummings submitted any affidavits on the issue. Thus, although it may turn out to be true, it is not clear from the record that theirs is a dispute between two tribal members.
[¶ 13] Also in her complaint, Francis alleges ownership of a private residence located on the reservation. Dana-Cummings denies this, averring specifically that the Authority owns the premises. Thus, at the base of this lawsuit is a property dispute. From the record, however, it is not clear that it is a dispute "arising out of tribal law and regulations."
[¶ 14] Although the record may, as the trial court observes, "reveal that the Tribe has an eviction code in place as well as a policy regulating property and home ownership on the reservation," it does not follow that those Tribal laws govern the present dispute. Francis simply alleges ownership of the residence. It is not clear what real property interest, if any, she has in the residence; nor is it clear whether her alleged interest is based on or derived from state law or tribal law.
*711 [¶ 15] Determination of Francis's rights to possession and occupancy of the residence are necessary to the resolution of her claims against Dana-Cummings, and that determination may well depend on the application or interpretation of tribal law. The record, however, has not been sufficiently developed to bear this out. Thus, the trial court erred in determining that it had no subject matter jurisdiction based on the record before it.
[¶ 16] This does not mean that the trial court cannot later determine that it lacks subject matter jurisdiction. Jurisdiction is the essential basis of the court's authority, and this issue may be raised at any time. See State v. Dhuy, 2003 ME 75, ¶ 8, 825 A.2d 336, 341; M.R. Civ. P. 12(h)(3) ("Whenever it appears by suggestion of the parties or otherwise that the court lacks jurisdiction of the subject matter, the court shall dismiss the action.").
[¶ 17] Francis contends that her ownership of the residence must be deemed admitted because she alleges it in her complaint. Courts are not required to deem allegations in a complaint as admitted when determining whether subject matter jurisdiction exists. Rather, a court deems allegations in a complaint as admitted when considering whether to dismiss the complaint for failure to state a claim for which relief can be granted. This was the second basis for the trial court's dismissal of the complaint, to which we now turn.

B. Failure to State a Claim
[¶ 18] The trial court's decision does not discuss why, in its view, the complaint failed to state a claim. It seems, however, that, because the trial court considered the dispute an internal tribal matter, it concluded that Francis could not state a claim based on state law. As previously discussed, the record is not sufficiently developed to allow the court to determine whether this dispute is an internal tribal matter. Moreover, reading the allegations in the complaint as true, Francis has stated a claim on all three counts of her complaint. The trial court erred in dismissing the complaint for failure to state a claim.
The entry is:
Judgment vacated. Remanded to the Superior Court for further proceedings consistent with this opinion.
NOTES
[1]  5 M.R.S.A. § 4682 (2002).
[2]  14 M.R.S.A. § 7551-B (2003).
[3]  14 M.R.S.A. § 6014 (2003).
[4]  The Authority responded to Francis's appeal by filing a brief and presenting oral argument before us. Dana-Cummings filed no brief and made no oral argument.
