The day after 9-year-old Shailyn Ryan learned how to do the Heimlich maneuver at a “Home Alone” kids safety class in her Massachusetts town, she looked up and saw her friend turning blue.

It was during lunch in the cafeteria on May 1 at Marguerite Peaslee Elementary School in Northborough when Shailyn suddenly felt a hand grip her left shoulder.

Her good friend and soccer teammate, Keira Silvia, 8, held a hand to her own throat and her face rapidly turned red, then blue. Keira was unable to speak, but Shailyn knew she was choking.

Shailyn leaped from her seat, stood behind Keira, tipped her friend slightly forward, then wrapped her arms around her waist. Making a fist with one hand and grasping it with her other hand above Keira's navel, she then pressed as hard as she could into her abdomen, pushing upward as though she was trying to lift her up.

Just as she had learned to do 16 hours earlier.

Almost immediately, a hot dog piece that Keira had been choking on popped up from her throat. It happened so quickly that cafeteria workers and most of the kids in the lunchroom didn't even notice.

"I didn't really think about it - I just did it," said Shailyn, who is now being hailed as a hero inNorthborough, population 15,033, about an hour's drive from Boston. "I wasn't scared, but I knew that I had to do something fast, so I did."

And she did it just right.

Keira was back playing soccer and football with her friends the very next day.

"She's awesome, a really good friend," said Keira, who like Shailyn, is in the third grade.

Then Keira explained how it happened.

"I swallowed too much of my hot dog and I was choking and couldn't breathe - it was scary," she said. "After Shailyn helped me, I cried and I hugged her. And yeah, I told her 'thank you.'"

Parents of the girls, school administrators and teachers in Northborough now have a message they'd like others to hear: Children are capable of much more than they're often given credit for.

"It's important to teach lifesaving skills to children and adults of all ages," said Allie Lane, a director at the Northborough Recreation Center where Shailyn signed up for a two-hour evening safety class geared toward kids ages 9 to 11.

"Shailyn was able to take what she'd learned the night before and apply it to real life," Lane said.

Keira's mother, Noel Silvia, still marvels at the timing of it all.

"It really is incredible how it all happened - that Shailyn had just learned how to do the Heimlich maneuver and happened to be sitting near Keira the next day when she started choking," Silvia said.

“Shailyn didn’t hesitate, she remembered what she’d been taught and she calmly did it,” said Silvia, 47.

Shailyn, an only child, said she signed up for the "Home Alone" safety class at her local recreation center because she'd always wanted to learn first aid skills, phone etiquette and other tasks that might come in handy when she is old enough to babysit.

At the class, she and several other children also watched a safety video and practiced doing the Heimlich maneuver on each other.

"She came home that night and talked about everything she'd learned - the Heimlich, making snacks when she's home alone and first aid, like how to get a bee's stinger out of your arm," said Shailyn's mother, Laurie Ryan.

Laurie Ryan was shocked to get a phone call from the school nurse at lunchtime the next day.

"She told me, 'Shailyn's fine, so don't worry. She's a hero,'" Ryan recalled. "When she said that Shailyn had given Keira the Heimlich maneuver, I was in awe."

"One, I couldn't believe what had happened," she said. "And two, I was stunned that Shailyn was in exactly the right place at exactly the right time. I felt incredibly proud. She kept her cool."

A few days after the incident, Shailyn was honored at a school assembly and given a certificate of recognition by principal Jill Barnhardt.

"We're very proud of both Shailyn and Keira for their actions during this situation," Barnhardt said. "Shailyn's calm response to her friend's distress was immediate and effective."

Shailyn was also thrilled to get a personal tour of her neighborhood's fire department since she now dreams of becoming an ambulance paramedic.

"That would be cool, or working in a hospital," she said. "I want to save more lives."

Keira also has plans for herself: “I never want to eat another hot dog again.”