“The victim was a child,” she said. “An 11-year-old boy.”

The velocity of events up to that moment had not permitted her to size up the two people. The man was muscular, she said, and over six feet tall. “I said, ‘Come here, come here,’ and grabbed the kid,” she said.

Inside, she sat the boy down and asked his age, where his mother was, where they lived. (Utica Avenue in Brooklyn, a long trek.) He wore a T-shirt bearing the name of his school, Life Sciences Secondary School, on East 96th Street in Manhattan, and a backpack. The solo commute on the train is a rite of passage for New York children in middle school, and for their parents.

“He was in shock,” Ms. Irwin said. “He could barely talk.”

To her amazement, the boy was gripping his phone, and Ms. Irwin suggested that he call home.

“He couldn’t speak, so he just handed me the phone, and his mother answered, ‘Hey baby,’” Ms. Irwin said. “I said: ‘I’m Jessie, I’m a teacher with your son. He’s O.K.’ I tried to explain what happened, and she said, ‘Wait — what?’ Then we lost reception.”

The assailant had not followed them into the car. Ms. Irwin saw a man looking at them through the doors, but was not sure if it was him. At the next stop, 14th Street, she led the boy to a transit police station.

“I said, ‘Just stay with me,’ and he ended up grabbing my hand,” Ms. Irwin said. “His arms were bruised from where the guy grabbed him. The police were very kind.”

The boy told her his name, but spoke so softly that she was not sure of it. Later, he told the police that he and a friend had been play-fighting and that the friend had accidentally struck the man, a stranger. Detective Kellyann Ort, a police spokeswoman, said the man who had been struck asked the boy, “‘Did you see that?’ and when he says no, the man grabs him.”