An Afghan girl shot dead two Taliban fighters and injured several more after they dragged her parents from their home and killed them for supporting the government, AFP reported referring to officials.

The incident happened last week when militants broke into the home of Qamar Gul, a teen from a village in the central province of Ghor.

Militants were looking for her father, local police chief Habiburahman Malekzada noted. 

Malekzada said her father was a supporter of the government, so Taliban fighters came to his house and dragged him and his wife out into the courtyard and killed them. "Qamar Gul, who was inside the house, took an AK-47 gun the family had and first shot dead the two Taliban fighters who killed her parents, and then injured a few others," he said.

Gul is aged between 14 and 16, and it is common for many Afghans to not know their precise age.

Several other Taliban fighters later attacked her home, but villagers and police fought off the attack. Afghan security forces have now taken Gul and her younger brother to a safer location.

Over the past few days, a photo of Gul wearing a headscarf holding a machine gun in her lap has gone viral. "Hats off to her courage! Well done," wrote Najiba Rahmi on Facebook. "Power of an Afghan girl," wrote another Facebook user Fazila Alizada.