Image copyright Reuters Image caption Schools were accused of links to the Gulen movement, which Turkey calls a terrorist organisation

A Pakistani court has ordered a stay on the deportation of more than 100 Turkish teachers accused of links to a supposed terrorist organisation.

The teachers and their families had been told to leave Pakistan within days after visa extensions were denied.

The teachers work at some of the 28 "PakTurk" schools, which Turkey says are linked to US-based Turkish preacher Fethullah Gulen. The schools deny this.

Turkey accuses Mr Gulen of being behind July's failed coup, a claim he rejects.

The visa decision, which applied to all Turkish teachers in the school network, coincided with a visit to Pakistan from Turkey's President Recep Tayyip Erdogan.

Now the Lahore High Court has delayed the sudden deportation order for at least 100 teachers and instructed the interior ministry to submit a response to the court in January.

Image copyright AP Image caption Pakistani students protested in support of their teachers in Lahore

The Pakistan Express Tribune reports that both the Sindh and Peshawar High Courts also protected teachers in those areas. The Dawn newspaper, however, reports that Islamabad's court refused to hear the case.

Since July's failed coup, Turkey has cracked down on any individuals or groups believed to have links to Fethullah Gulen.

Tens of thousands of people from every level of society have been purged from their jobs, including senior military officers, government officials and school teachers.

Critics of President Erdogan say he has used the coup attempt as a way of removing his opponents.