Watch ‘Italy’s Migrant Boot Camp’, on SBS OnDemand

It was hot, and the men were dripping sweat as they worked, but they weren't allowed to remove their heavy, high-vis jackets – not while I was filming.

We were in Bergamo, a wealthy city in northern Italy, where the picturesque historic centre is ringed with 16th century Venetian walls, and thronged with Ryanair passengers buying soap and ceramics. I'd come to the town's 19th century cemetery to watch, uncomfortably, as migrants from sub-Saharan Africa cleared weeds away from the graves.

It was described to me as "voluntary", but none of them had been asked if they wanted to be here today. This unpaid community work, which occupied four afternoons of their week, was one of many pre-conditions for their participation in a controversial migrant "boot camp."

"The Academy for Integration – Thank you, Bergamo" (to use its full, unwieldy title), aims to convince increasingly sceptical Italians that well-behaved migrants deserve to stay. It does this not only by providing them with intensive Italian classes and, after an initial nine months, helping them get jobs with local businesses, but by policing their behaviour and appearance to ensure they make the best possible impression on the public – and visiting journalists.

The 35 male asylum seekers who've just completed the first year of the program are almost all from sub-Saharan Africa. They've had their initial claims for humanitarian protection denied, and although they're waiting to appeal that decision, most realise that they won't qualify as refugees. But in Italy, as in many parts of Europe, there's a "criterium of social integration" – in other words, you're more likely to get residency if you show you can fit in.

So in return for the hope, if not the promise, of being allowed to stay, they signed up for 6am starts, bedroom inspections (when a poorly-tucked sheet earns you extra cleaning duties), military-style musters (several times a day they line up at attention and chant "Thank you, Bergamo!"), a wardrobe that consists entirely of three different uniforms (all emblazoned with "Thank you, Bergamo"), and the aforementioned "voluntary" work.

Dateline

One of the men toiling in the graveyard that day was Abdou Sambou, a 30-year-old tailor from Gambia with two young daughters he misses terribly. He described the Academy as a military camp, and said that when they go out in their uniforms, other migrants call out, "The prisoners are coming!" What bothered him most was that even during their free time, they're not permitted to wear their own clothes, or even to take a nap - "This control for me is very hard."

But Sambou understood very well that the over-the-top rules, along with all the media attention the Academy has attracted, are about more than the fates of a few dozen African migrants. "The Academy, they're using us as politics," he told me.

It won't come as a surprise to learn that Academy founder and director, Christophe Sanchez, has a military background – he spent time in the French army, where he transformed civilians into soldiers during basic training. But although it sounds like the Academy was dreamed up by some authoritarian right winger, Sanchez is also the chief of staff of Bergamo's mayor, Giorgio Gori, who comes from the centre left Democratic Party. The Academy for Integration, which is run through the municipality, is their solution to the toxic politics around immigration – and they're hoping that it will get picked up and replicated by other cities.

The ambitious Gori, who ran an unsuccessful campaign to become President of Lombardy last year, says "a third way" is urgently needed - a middle path between the humanitarian values of the left, and the hardline, anti-migrant approach of the right.

Dateline

It's tough being a centre left politician in a time of populism, and especially tricky in Italy, which has borne the brunt of Europe's refugee crisis. The arrival of hundreds of thousands of migrants in the space of just a few years has fuelled the rise of the far-right League party, and its wildly popular leader, Matteo Salvini. Using social media to confront and demonise migrants helped Salvini become Europe's most-followed politician on Facebook, and he's widely seen as a Prime Minister-in-waiting.

But Gori and Sanchez are uniquely qualified for the challenge. They used to work together in Silvio Berlusconi's television empire, where they introduced Italians to shows like Big Brother. They know how to manipulate the fears and desires of an audience, and they understand the importance of spectacle. They wanted to find a way to persuade the public that the Left isn't a soft touch. Fear, the mayor told me, cannot be fought with statistics.

"Let's not forget," Sanchez said, "that today we're living in a very angry climate. Now, the fact that citizens can see young people who clean the streets, who clean their cemeteries, and who have written 'Thank you, Bergamo', this is also a way of reconciling the angry feelings they've had towards these people."

I was having trouble reconciling my ambivalent feelings about the Academy, but it was hard to be too critical when you come from a country with a reputation for cruelty towards asylum seekers.

Sanchez was offended by my suggestion that the Academy was unnecessarily harsh, and replied sharply, "Excuse me, in Australia don't they imprison immigrants on islands?"

And of course he had a point.