Sameera Makamdar, 13, was draping a scarf around her head and was holding the pin between her teeth - but forgot and started to talk.
The teenager initially kept it a secret, fearing she'd be in trouble, but her worried sister told her parents who took her to hospital after "home remedies" failed.
An X-ray revealed the sharp end was piercing her stomach wall, and doctors put a camera and pincers down her throat to pull it out.
Medics in Vasai, India, said the teen was lucky the pin did not cause any major internal injuries.
"We put her under anesthesia and performed an upper gastrointestinal endoscopy to locate the pin," Dr. Rajeev Hingorani, a gastroenterologist at Cardinal Gracious Memorial Hospital, said. "Fortunately, it had not completely pierced the stomach wall by then and there was no internal bleeding or major injury either. But the sharp end of the pin was partly inside the stomach wall, making it difficult to retrieve."
The team of doctors used biopsy forceps to safely pull out the pin and gave it to her mom.
"We cautioned the family about such incidents because Sameera was lucky that the pin did not cause any major internal injuries or damage the stomach walls," Hingorani said. "Had there been a delay in the treatment, we would've been forced to perform a surgery."
The pin was removed on Jan. 21.
"Our younger daughter told us that Sameera swallowed the pin, but was not telling us about it, thinking we would scold her for the negligence," Dadaseer Makamdar, the teen's father, said. "At first we tried some home remedies to get the pin out, but the pin couldn't be retrieved."