
2 A.3d 340 (2010)
2010 ME 84
GUARDIANSHIP OF KEAN R. IV.
Docket: Wal-09-512.
Supreme Judicial Court of Maine.
Submitted on Briefs: May 27, 2010.
Decided: August 24, 2010.
*341 Aaron Fethke, Esq., Searsport, ME, for father.
The paternal grandmother did not file a brief.
The mother did not file a brief.
Panel: SAUFLEY, C.J., and ALEXANDER, LEVY, MEAD, GORMAN, and JABAR, JJ.
JABAR, J.
[¶ 1] The father of Kean R. IV appeals from a judgment of the Waldo County Probate Court (Longley, J.) appointing guardianship of the child to the paternal grandmother pursuant to 18-A M.R.S. § 5-204(d) (2009). Because the court instructed the parties at the outset of the hearing that it was proceeding pursuant to 18-A M.R.S. § 5-204(c) (2009), but then decided the case pursuant to section 5-204(d), a statutory basis that had not been pleaded or litigated, we vacate the court's judgment.

I. BACKGROUND
[¶ 2] Kean's mother and father are unmarried, and there is a parental rights and responsibilities order in place providing that the father cares for Kean Mondays through Fridays, and the mother cares for Kean on weekends. Sometime around the end of 2007 or early 2008, the father violated the conditions of his probation in an unrelated criminal matter and was incarcerated. He remained in jail until August 2009. Kean's father arranged for Kean to live with his paternal grandmother while the father was incarcerated.
[¶ 3] In March 2009, the paternal grandmother filed a petition for guardianship of Kean. She supported her petition by explaining that she wanted Kean to live with her until the father was released from jail and had achieved a stable life.[1] In addition, she wanted Kean to stay in his current elementary school.
[¶ 4] The court held a hearing in September 2009. The mother, father, and grandmother were present, but only the father was represented by counsel. For the benefit of the self-represented parties, the court carefully explained how it would conduct the proceedings. As part of its explanation, the court repeatedly instructed the parties that, in order to prevail on her petition, the grandmother would need to prove (1) a temporarily intolerable living situation, and (2) that a guardianship would be in Kean's best interest, the elements required to satisfy 18-A M.R.S. § 5-204(c).[2]
[¶ 5] The grandmother testified first, and explained that Kean was a bright but shy child and that she wanted him to continue to live with her until he completed fifth grade. She acknowledged that Kean's father's life was "pretty good," in *342 that he was out of jail and no longer on probation, shared a two-bedroom apartment with his wife and another minor child, and had a full-time job. The mother testified that she had filed a motion in the District Court to amend the parental rights order, and that that court had scheduled a hearing for October 2009. She also stated that, as long as she continued to see Kean on weekends, she supported Kean's placement with his father.
[¶ 6] After the grandmother and the mother testified, the father moved for a judgment as a matter of law pursuant to M.R. Prob. P. 50; M.R. Civ. P. 50(d). The court reserved a ruling on the motion, explaining that it "need[ed] more information." The father then testified. He confirmed the grandmother's testimony regarding his employment and living situation, and expressed that he was fully prepared to "jump right back into" being Kean's primary caretaker. At the close of all the evidence, the father did not renew his motion for judgment as a matter of law. The court granted the grandmother's request to be appointed guardian.
[¶ 7] The court found by a preponderance of the evidence that (1) the grandmother was Kean's de facto guardian,[3] and (2) there was a demonstrated lack of consistent participation by the parents. The court further found that a guardianship was in Kean's best interest because the grandmother had become the primary caregiver; Kean had adjusted to his school and community; he was in a stable, satisfactory environment; it would promote continuity and permanence; and Kean was shy and had difficulty with sudden change. Based on those findings, and, despite its instructions concerning section 5-204(c) throughout the hearing, not on any finding of intolerable living conditions, the court issued a judgment granting the grandmother guardianship pursuant to section 5-204(d).[4] The court limited the guardianship pursuant to 18-A M.R.S. § 5-105 (2009) to allow the parents access to Kean's educational and medical information and to permit them to spend time with Kean. The father appealed.

II. DISCUSSION
[¶ 8] The court erred when it decided the case pursuant to section 5-204(d) after it instructed the parties that the petition would be decided pursuant to section 5-204(c). *343 The elements of section 5-204(c) focus on intolerable living situations and the best interest of the child; the elements of 5-204(d) focus on de facto guardianship and lack of consistent participation. Section 5-204(d) was not pleaded or litigated, and it could not serve as the basis for the court's judgment.
[¶ 9] The court did not find that a guardianship could be granted on the grounds of intolerable living circumstances. Therefore, we infer that the court concluded that the grandmother did not meet her burden pursuant to section 5-204(c), and we affirm that judgment. There was no evidence in the record that the father was unfit or no longer able to safely care for his son.
[¶ 10] We cannot, however, affirm the court's judgment issued pursuant to section 5-204(d). An issue not raised in the pleadings or in a pretrial order is not properly before the court unless it is tried by express or implied consent of the parties. See M.R. Prob. P. 15; M.R. Civ. P. 15(b); DiBiase v. Universal Design & Builders, Inc., 473 A.2d 875, 877-78 (Me. 1984). Here, section 5-204(d) was not raised in the pleadings, the court never gave the parties notice that it considered this to be an issue in the case, and it was not tried by express or implied consent. Accordingly, the court erred in granting a guardianship pursuant to section 5-204(d).
The entry is:
Judgment granting guardianship vacated.
NOTES
[1]  The grandmother filed a guardianship plan on the same day that she filed the guardianship petition. When describing Kean's living arrangements in the guardianship plan, the grandmother noted that Kean visited his father in jail monthly.
[2]  Title 18-A M.R.S. § 5-204(c) (2009) provides that the court may appoint a guardian for an unmarried minor if:

The person or persons whose consent is required ... do not consent, but the court finds by clear and convincing evidence that the person or persons have failed to respond to proper notice or a living situation has been created that is at least temporarily intolerable for the child even though the living situation does not rise to the level of jeopardy required for the final termination of parental rights, and that the proposed guardian will provide a living situation that is in the best interest of the child.
[3]  Title 18-A M.R.S. § 5-101(1-B) (2009) defines "de facto guardian" as:

[A]n individual with whom, within the 24 months immediately preceding the filing of a petition under section 5-204, subsection (d), a child has resided for the following applicable period and during which period there has been a demonstrated lack of consistent participation by the parent or legal custodian:
(a) If the child at the time of filing the petition is under 3 years of age, 6 months or more, which need not be consecutive; or
(b) If the child at the time of filing the petition is at least 3 years of age, 12 months or more, which need not be consecutive.
"De facto guardian" does not include an individual who has a guardian's powers delegated to the individual by a parent or guardian of a child under section 5-104, adopts a child under Article 9 or has a child placed in the individual's care under Title 22, chapter 1071.
(Footnotes omitted.)
[4]  Title 18-A M.R.S. § 5-204(d) (2009) states that the court may appoint a guardian without the parents' consent if:

[T]he court finds by a preponderance of the evidence that there is a de facto guardian and a demonstrated lack of consistent participation by the nonconsenting parent or legal custodian of the unmarried minor. The court may appoint the de facto guardian as guardian if the appointment is in the best interest of the child.
