SCOTTISH university chiefs are calling for legislation to clamp down on essay mills and other forms of online cheating.

The principals of Glasgow University and St Andrews University are part of a national campaign on the issue with more than 40 UK institutions.

The group has written to Westminster Education Secretary Damian Hinds calling for companies who offer essay-writing services to be made illegal.

As many as one in seven recent graduates may have cheated by using “essay mills” during the last four years, according to a recent study.

Students who get caught face punishment, including possible disqualification.

However, unlike traditional plagiarism, essay mills provide students with bespoke, original pieces of work which cannot easy be detected by anti-plagiarism software.

Companies offering bespoke essays regularly advertise online, on social media, near university campuses and even on public transport.

The letter, signed by Professor Sir Anton Muscatelli, principal of Glasgow University, and Professor Sally Mapstone, principal of St Andrews University, says the services should be targeted.

It states: “Essay mills undermine the integrity of UK higher education and are unfair to the vast majority of honest, hard-working students.

“This form of cheating is particularly hard to detect and, whilst universities must continue to do their part, it is clear to us the time has come for the Government to give legislative backing to the efforts to shut down these operations.

“Legislation will not be a magic bullet. It is, however, a vital part of the broader package of measures.

“Most importantly, it will send a clear statement to the global higher education sector that the integrity of a UK degree is valued by the Government.”

Sam Gyimah, the Westminster Universities Minister, said outlawing the services completely remained an option.

He added: “I also expect universities to be taking steps to tackle this issue.”

Ireland, Australia, New Zealand and 17 US states are already introducing bans.