An 8-year-old girl riding a dollar van in Brooklyn Monday was wounded when a bullet pierced the window, sources said.

The girl was hit by a combination of bullet fragments and shattered glass when a shot was fired from outside a Popeye’s chicken restaurant on Flatlands Avenue around 6 p.m., according to police sources.

The chaos started when a group of teens inside the fast food joint began to brawl and it spilled onto the street.

“We ran them outside,” said store manager Marlando Douglas. “When they went outside they were still fighting.

“Then one of them pulled a gun and fired.”

The injured girl was bleeding from the back of the head and a bullet was lying next to her inside the bus, sources said.

The victim was alert and talking. She was taken away by ambulance in non life-threatening but critical condition.