A PAKISTANI girls' school teacher was killed in a drive-by shooting in the country's volatile tribal belt on the Afghan border, officials said.

There was no immediate claim of responsibility for the attack, but Islamist militants are particularly opposed to girls' education in the northwest, where they have bombed hundreds of schools in recent years.

Teacher Shahnaz Nazli, 41, was shot dead in Shahkas, near the town of Jamrud in Khyber tribal district, between the northwestern city of Peshawar and the Afghan border.

She was on her way to the government girls' primary school in Shahkas when gunmen fired at her about 200 metres from the school and fled, said local government official Asmatullah Wazir.

"The teacher was killed after unknown gunmen on a motorbike shot her and fled," Mr Wazir said.

Local education officer Mohammad Jadoon Khan confirmed the shooting and death of the teacher.

Violence has increased in northwest Pakistan ahead of elections, which are due on May 11 and which will mark the first time an elected civilian government completes a full term in office.

Last October, a Taliban gunman shot and wounded schoolgirl Malala Yousafzai for campaigning for girls' education in Pakistan's Swat Valley, in an attack that shocked the world.

The military has long been fighting Taliban and other Islamist insurgents in Khyber, which straddles a key NATO supply route into Afghanistan, where US-led combat troops are due to leave next year.