In the last moments of his 14-year life, Joe Phillips dialed his friend's cellphone, cursing in panic. He was trapped by flames that had gotten out of control during what had been a summer afternoon of mischief inside a vacant building.

"I'm really stuck, dude, I'm (expletive). I'm (expletive) going to die," Phillips shouted into the voice mail of the 13-year-old who'd been with him moments earlier at the tire recycling complex.

Then panting, with resignation in his voice, "Sorry, dude. I love you, man," the call ended. "I never thought I'd die this way."

On Tuesday, the surviving teen, now 14, will learn his fate in Family Court. He could be sentenced to 18 months in a juvenile detention facility after pleading guilty in March to arson and burglary as part of an agreement that erased a charge of criminally negligent homicide in his friend's death.

The boy, whose name has not been released because of his age, has been in and out of the hospital with mental health issues and has tried to harm himself, a probation officer testified this month.

Joe's mother, Ann Phillips, won't say what punishment she thinks the 14-year-old, who never called 911, deserves. Reached by phone, she said she wants to keep her feelings private until after the hearing.

Phillips cried when her son's final phone call was played in court this year. On Aug. 10, 2016, the fire at High Tread International in Lockport was raging, filling the sky with thick black smoke. About 200 homes had been evacuated. Joe was missing.

The family feared he'd been trapped by the fire. Still they held out hope the boy weeks away from beginning high school had made it out.

"He might be scared and he's hiding to avoid getting into trouble," his older sister Alyssa Phillips wrote on Facebook as the fire burned for a second of three days.

The fire had become so big that fire crews had to take water from the nearby Erie Canal to douse the flames.

"Until I see his dead body, I will keep believing he's alive," Alyssa wrote.

Firefighters found Joe's body on Aug. 13.

Looking back, Ann Phillips says it doesn't surprise her that her son used his final moments to express his love to a friend.

"Joe liked everybody," she said. "There's not anybody that he didn't like. ... He was the type of kid who wanted to be friends with everybody."

Along with the phone message, video found on the surviving teen's phone offered a view into the building that day. It shows a fire escape the teens used to get inside. They walk though darkened rooms using a lighter to ignite papers and watch them burn. The video and phone message, obtained by The Associated Press through a Freedom of Information request, were first reported by Buffalo television station WIVB.

"This is how you make, like, a real big fire," one of the boys is heard saying while video shows papers curling into brightening flames.

"Oh, it's going to spread out. Oh, it's so cool," the other boy says.

When one of the fires spread too quickly, defense attorney A. Angelo DiMillo said, the surviving teen ran outside to get water as Joe used his shirt to try to tamp down the flames.