A controversial sonic device which violates EU torture laws and is used to disperse teenage gangs has been installed at a Scottish train station frequently targeted by marauding youths.

Known as a “mosquito”, the anti-loitering device emits a high-frequency sound normally audible to under-25s in a bid to stop them congregating.

It has now been confirmed that a device has been installed at Hamilton Central railway station in a bid to tackle anti-social behaviour.

However campaigners have said the move is discriminatory towards young people, regardless of whether they are misbehaving.

Amy Lee Fraioli said she heard the device while she was travelling home on Saturday night. She said it emitted a “horrific” high-pitched screeching which was “the most uncomfortable noise to sit through”.

Amy Lee, 19, who lives in Rutherglen, said she had been aware of the devices through her work as chairwoman of the Scottish Youth Parliament.

A student of International Politics and Modern Languages at the University of Stirling, she said: “People are very concerned, as they should be.

“There are many ways to solve anti-social behaviour issues, especially in a manner that doesn’t target one section of society, because the anti-social behaviour at Hamilton Central is not all caused by young people.

“Even in the situation that it was, it would be unfair to punish every young person that visits the station.”

The UK has been prolific in its use of mosquitos: at one point there were more than 3,500 installed in sites across the country – compared to 5,000 across Europe as a whole. It does not cause any permanent damage to a person’s hearing. However, the United Nations and other international human rights bodies have been raising concern about the issue for a number of years. In 2010 the Parliamentary Assembly of the Council of Europe called on Scotland and other countries to ban the devices, saying it violates legislation prohibiting torture.

Bruce Adamson, the new Children and Young People’s Commissioner Scotland, said that he was disappointed that ScotRail was using them.

He said: “The use of such devices is a breach of children’s rights to go about their lives free from discrimination in a healthy and safe way when they use public transport, visit shops or meet their friends.

“These devices are a disproportionate and degrading approach that acts without discrimination, causing discomfort to any children and young people who encounter them.

“The Scottish Government and public authorities are under a duty to protect children from harm, they must act to ban these devices.”

ScotRail said it had used the anti-loitering systems in the past and that the device was only activated when anti-social behaviour was taking place.

The mosquito had been installed through discussions with local politicians and Police Scotland.

A ScotRail Alliance spokesman said: “The safety of our staff and customers is always our number one priority.

“As part of this multi-agency approach we have introduced a suite of measures to tackle anti-social behaviour and since these have been put in place there has been a significant reduction in incidents in and around the station.”

Recently, some 100 staff took part in a demonstration at Hamilton Central saying that more had to be done to combat “headbangers and nutters” that had been congregating there for over two years.