The unidentified 17-year-old was trying to get into her home near 1700 West Baseline Road, at around 5 p.m. on Wednesday night, when she became trapped, Phoenix Fire Department spokesman Todd Keller told Arizona Republic. Fire crews were called to the residence, where they discovered the teenager stuck in the bottom of the chimney, Keller said.

The girl was lodged above the chimney’s flue, a pipe used to transport fumes from a lit fireplace, the Associated Press reported. The girl was able to call her sister and 911 from inside the chimney.

In an interview with Fox 10, the girl’s friend, identified only as Yasmeen, recalled the incident.

That night, the pair had got locked out of Yasmeen’s home near 19th Avenue and Baseline Road. So, they decided to try to get inside the unnamed 17-year-old’s home, instead. The girl suggested getting in through the chimney, and climbed on the roof. Then she got trapped.

“I didn’t know it was blocked in the bottom,” Yasmeen told the Fox 10. “I never thought it was blocked on the bottom, so she went down and she started freaking out.”

“I don’t know what we were thinking,” she said.

Fire department officials told Fox 10 that the girl spoke to crew members throughout the rescue operation, which the broadcaster live-streamed on Facebook.

In a process to free the girl from the chimney which took more than 40 minutes, according to Fox 10, the firefighters put up a tripod, and hoisted her from the hole.

Fox 10 reported the teenager was soot-covered but smiling when she eventually emerged from the chimney.

The girl refused an offer from officials to be taken to hospital, Fox 10 reported.

However, the Associated Press reported the girl was transported to hospital to be checked out. She did not appear to have suffered any injuries during her ordeal.

Fire department spokesman Keller told Arizona Republic the girl was checked at the scene, and didn’t want to be taken to hospital.

Yasmeen’s parents were at the cinema as the situation unfolded, and quickly left when they heard what was happening.

“They were so mad. Really mad,” Yasmeen told Fox 10.

Keller told ABC 15 Arizona: “We don’t see it very often, not in a chimney. This is definitely something we don’t do every day.”