For almost 8,000 young Italians hungry for work, the exam last month for 400 prison guard jobs was a fiasco. For the mafia, it may have been a great opportunity, prosecutors in Rome have said.

They are investigating widespread and organised cheating, after 88 people were caught wearing bracelets or bringing in mobile phones with covers carrying the answers to the test, or with radio transmitters and earpieces thought to have been used to pipe in the answers.

The Camorra mafia, whose heartland is Campania including Naples, where a company printed the exams, may have obtained the answers and tried to get its people inside a prison system that is holding 7,000 gang members, including about 700 bosses, prosecutors say.

The Camorra is also thought to have sold the answers to other applicants for as much as €25,000 (£19,000), according to posts on social media.

The Rome court would not give further details about the investigation. The justice ministry wants the exam results to be nullified.

Donato Capece, general secretary of Sappe, Italy’s biggest union for penitentiary workers, Sappe, said the possible organised rigging was shameful. “We were the first ones to ask the ministry for clarification,” after the cheating was discovered, he added.

In Italy, where youth unemployment has been at about 40% for three years and full-time staff jobs are nearly impossible to find, the exam cheating sheds light on some of the woes that have long afflicted the economy: widespread corruption, pervasive mafia influence, a lack of meritocracy and a rigid labour market.

“Unfortunately, those who deserve jobs often are not the ones who get them,” said Mina, 29, one of the 1,400 women to take the exam. “We don’t get to have dreams for the future.”

Cheating in exams for public jobs is not uncommon in Italy and there have been several criminal investigations in recent years, including into tests for a university professorship and to be a traffic police officer.

In a square near the justice ministry in Rome on Tuesday, dozens of people in their 20s who took the test in April, as well as Sappe members, blew whistles, waved flags and sang the national anthem, demanding that the government immediately hire 1,000 guards.

“I would be proud to wear a uniform for the state,” Mario, 25, said. “But it’s also a question of finding a job because it’s very difficult in Italy to find employment and have a future.”

Protesting alongside him, Maurizio, 24, said: “We’re sick of Italy’s indifference and code of silence.”