Dutch police said Tuesday they had released a former British School pupil arrested in connection with an online threat to carry out a school shooting after ruling him out as a suspect.

The threat to "shoot my Dutch teacher and as many students as I can" made on a US-based website over the weekend led to all secondary schools in the university city of Leiden being closed on Monday and armed police being deployed.

"The suspect arrested for threatening a Leiden school has been released... and is no longer a suspect," police said in a statement.

The one-time pupil, who was arrested on Monday, had attended the British School in Voorschoten, between Leiden and The Hague, but was expelled in October 2011, the school said.

Police gave no further information about the former suspect.

Police said experts had analysed the post on the 4chan.org forum and decided to "reduce the threat level."

Schools in Leiden were open as usual on Tuesday, but with a police presence.

Authorities in Leiden had decided late Sunday night to close secondary schools to thousands of pupils after a tip-off by Swiss police following the threat.

"I will shoot my Dutch teacher and as many students as I can," said the anonymous message in English on the 4chan.org website.

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

"Oh, and I'm using a proxy, the police is not gonna find me before tomorrow," the message ended.