Leiden School
Police patrol a school in Leiden, Nederland (Twitter)

Dutch police have arrested a suspect after a threat to kill a teacher and students sparked a shutdown of schools in the city of Leiden.

Authorities ordered 22 schools to remain closed after a warning was posted online over the weekend.

The anonymous threat was posted on US based website 4chan.org.

"I will shoot my Dutch teacher and as many students as I can," the message in English read.

"It's at a school in the Dutch city of Leiden and, for more proof, I will be using a 9mm Colt Defender.

"Oh, and I'm using a proxy. The police is [sic] not gonna find me before tomorrow."

Police confirmed that an arrest had been made but would not disclose further details and dismissed reports claiming that a weapon had been found in one school.

According to local newspaper De Telegraaf, the person in custody was a former male student of a British school in Voorschoten, a few kilometres south of Leiden, who had been thrown out because of bad behaviour in 2011.

"We have been informed that a former student of the British School in the Netherlands has been arrested in connection to threats made against a Dutch school in Leiden," the school confirmed.

The warning message was first spotted by Swiss investigators carrying out internet checks.

Swiss detectives tipped off Dutch authorities who decided to shut down local middle schools - attended by students aged between 12 and 16 - as a precaution. Police patrols were put on standby at school gates.