A 9-year-old girl fatally struck after getting off her Montgomery County school bus appeared to have walked back to the bus as it was pulling away and gotten tangled up near the side door before she was hit as the bus continued moving, officials said Friday.

Investigators are studying video from the bus’s external safety cameras that captured much of what happened in a Bethesda neighborhood off River Road, according to Capt. Tom Didone, director of Montgomery police’s traffic division.

“It’s heartbreaking,” Didone said.

Less than 16 hours after the girl was struck, a 17-year-old student was hit by an SUV as he was crossing a road to get to a school bus. That boy, a senior at Walter Johnson High School, was hospitalized with life-threatening injuries. Investigators also will be reviewing external bus video in that case, Didone said.

The 9-year-old, who was not identified by police officials, was a fourth-grader at Bradley Hills Elementary School. In a letter to school families, Principal Karen Caroscio wrote that the community was “heartbroken by this tragic news” and that counselors would be on hand to help students.

On Thursday afternoon, the girl boarded a county school bus that eventually traveled down Tanglewood Drive. Just before Millwood Road, officials and residents said, the bus stopped to drop off students.

Several children, including the girl, got out and walked away from the bus, according to preliminary findings from investigators.

The bus began moving again, making its routine right turn onto Millwood, when “for unknown reasons, the girl turned around and headed back toward the bus,” Didone said. “There is no indication that the driver knew the girl had come into the path of the bus.”

Seconds later, the driver stopped the bus, got out, and called 911, according to police and residents. “He seemed very worried, very distressed,” said Michael Sullivan, who had come out of his home near where the bus had stopped.

Sullivan said he then saw the child on the road, behind the stopped bus. He could tell her head and face were injured, but saw her legs moving. Sullivan said two adults were bent down over the girl. “There were two women who were comforting her,” Sullivan said.

Paramedics arrived, began treating the child, and took her to Children’s National Hospital in the District, where she died, police said.

Officials said the driver, 53, stayed at the scene.

Sullivan said he spoke briefly with the driver, who told him a group of children got off the bus and walked away.

“He started making the turn and he heard a noise,” Sullivan said, recalling what the driver told him. “He stopped.”

Tony Curtis, a resident of Tanglewood Drive, said the school bus stops every afternoon in front of his house, just before it makes the right turn. When the children exit the bus, he said, they do so onto the edge of his yard and walk away from the direction of the bus.

“Always the same, every day,” Curtis said. “Those kids never go in front of the bus.”

Parents and other adults are always there waiting — some of them on foot, some of them lined up in cars, Curtis said.

Curtis did not see the accident on Thursday. But he said he always sees responsible bus driving. “They never leave fast. They never turn fast,” he said.

At about 7:20 a.m. Friday, the 17-year-old Walter Johnson student attempted to cross Montrose Road, near Bargate Court, to catch a bus. The student was walking in the area of a crosswalk, according to Didone, as the school bus was slowing down in the far right lane.

A 2018 Jeep Renegade going the same direction, one lane to the left, drove past the bus and struck the student, Didone said. The driver remained at the scene.

Investigators are working to determine whether the bus was decelerating, in which case yellow lights would have been flashing, or if it had come to a full stop, in which case red lights would have been flashing and a stop sign would have swung out, telling cars to stop.