KABUL- Thousands of Afghan families are fleeing Pakistan to escape harassment after a deadly Taliban attack on a school in Peshawar last December, the head of the International Organization for Migration (IOM) in Afghanistan said today.

More than 22,000 undocumented Afghans flocked across the border at Torkham in January, more than twice the figure for the whole of 2014, said Richard Danziger, the IOM's mission chief in Afghanistan.

Almost 1,500 others were deported in the same month, double the number of deportees in December.

"It all started with the attack on the school in Peshawar," Danziger told. "When something horrible happens, people start taking it out on foreigners."

Taliban militants attacked a school in the northwestern Pakistani city of Peshawar in December, killing more than 130 children and prompting Pakistan to step up operations against insurgent hideouts along the border with Afghanistan.

Cooperation between Afghan and Pakistani security forces has also improved since the attack and has led to the arrest of suspects in Afghanistan, where officials believe it was planned by the Pakistani Taliban.

However, Afghans living in Pakistan are reporting incidents of harassment such as raids on their homes and police coercion, the IOM and other officials said.

Most of the Afghan families settled in Pakistan decades earlier and have nowhere to go once they return, Danziger said.