The team at Morristown Medical Center found a lithium battery lodged in the little girl's throat.
That was less than two weeks ago, but 4-year-old Aliyah is on the mend now.
Aliyah surprised her grandparents the other night, coming back from the hospital sooner than expected after an accident that could've been devastating.
For days, no one knew it was there, but Aliyah was having problems.
"She started throwing up and then she passed out," Aliyah's mother Ashley Tufuga said.
Tufuga called 911.
"She wasn't normal for a 4-year-old," said Ian Lewis, of Fanwood Volunteer Rescue. "We knew something was wrong."
The doctors at Morristown Medical Center had a mystery on their hands.
"Actually when she arrived, we didn't know what was wrong because the battery swallowing wasn't witnessed," Dr. Eric Lazar said.
And that kind of battery causes severe damage.
Lazar said they start discharging because contact points are right next to each other and burning through the esophagus.
However, they still didn't know that the battery was there. Aliyah seemed stable enough to be discharged, but her mom said no.
"I was like no," she said. "Everything's not fine. I know my baby. They said she's awake. She's not up."
The hospital ordered an x-ray and discovered the battery. She was immediately taken to surgery.
"The surgeon was so worried about how long the battery was in there, they rushed her in to get it out," Tufuga said.
Aliyah had to spend 2 weeks in the hospital. She's on a liquid diet, but is doing fantastic.
The battery had come from a battery-powered tea candle in a Halloween display.
Dr. Lazar says honey can help if parents ever face this type of crisis and can protect a child from harm until they reach the hospital.
MORE NEWS: 5-year-old boy mauled by dogs in Jamaica gets new lease on life with surgery in New York City
* More New Jersey news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
*Follow us on YouTube