Islamabad,Pakistan (CNN) -- Eight girls were injured when two militants on motorbikes tossed grenades inside a girls' school in northwest Pakistan on Tuesday, a police official told CNN.

The attack took place in a village in Mardan, a district 40 km north of Peshawar.

The region has seen a drop in militant attacks in recent weeks, but during the past two years militants have attacked and bombed hundreds of schools in northwest Pakistan because girls' education is against the Taliban's interpretation of Islamic law.

Journalist Nasir Dawar contributed to this report.