Two York City boys escaped serious injury Wednesday morning when they were struck by a car while on their way to day care, city officials said.

York City Assistant Fire Chief Pat Rose said it happened in front of the Community Progress Council in the 200 block of East College Avenue about 7:50 a.m.

The boys -- who are cousins -- had been walking with their grandmother when they broke away from her and ran in front of a car, Rose said.

It appears they suffered only minor injuries and were transported to a local hospital as a precaution, he said.

One boy had a bruise on his head, the other said his side hurt, Rose said.

Both boys were 4 years old, according to York City Police Lt. Kevin Girling.

Girling said the driver of the car was not at fault and isn't facing charges.

He said the grandmother was holding each boy's hand when the boys decided to race across the street. The boys ran directly in the path of a moving car, Girling said.