The pursuit began at 8:15 a.m. Tuesday with a routine traffic stop on an Upper West Side street, quickly escalating when the 17-year-old driver, who the police said did not have a valid license, chose to flee as officers approached.

Eight blocks and roughly 30 seconds later, it came to an abrupt and tragic end.

The police said the teenage driver, Franklin Reyes, lost control of his S.U.V. at Amsterdam Avenue and 97th Street, fatally striking a 4-year-old girl, Ariel Russo, as she walked on the sidewalk with her grandmother, who was injured in the crash.

The police arrested Mr. Reyes on charges of manslaughter and vehicular manslaughter. He had borrowed his family’s vehicle without permission, the authorities said, and was driving with only a learner’s permit, which requires an adult in the car.

Alcohol or drugs did not appear to have played a role in the morning crash, and investigators said the driver’s inexperience may have been a key factor.