The mayor of Riace in southern Italy has been banished following accusations he organised "marriages of convenience" for immigrants.
The court order puts Domenico Lucano in the unusual position of being mayor of a town he is forbidden to step foot in.
He had spent the last fortnight under house arrest.
His partner was also accused of helping illegal immigration but has been allowed to stay on condition she signs in regularly with the authorities.
Mr Lucano has vowed to continue his methods of integrating migrants into southern Italy without public money.
His banishment follows months of tougher migration enforcement from Italy's populist government.
One of the government's toughest critics, the writer Roberto Saviano, tweeted his support for the ousted mayor by quoting a verse from Dante's Inferno, which translates as:
"Come after me, and let the people talk: stand like a steadfast tower, that never wags its top, for all the blowing of the winds."
The mayor, known as Mimmo, made headlines around the world for his unusual programme that welcomed migrants to the sparsely populated town in Calabria, giving them abandoned homes and on-the-job training, in the hope that the new arrivals would rejuvenate the economy.
He started the programme in 1998 under a previous government, and since then hundreds of migrants have joined the small town of about 2,000 people.
The success of the programme, lauded by many as a model of integration, led to Mayor Lucano being named one of the world's 50 greatest leaders by Fortune magazine in 2016.
At the start of October, he was arrested by Italy's financial police as part of an investigation into allegedly facilitating illegal migration.
Former Integration Minister Cécile Kyenge poured scorn on the arrest, arguing that the main thrust of the criminal investigation into the mayor had been abandoned. "So what's #MimmoLucano done wrong? Solidarity and humanity, perhaps?" she tweeted.
What were the charges?
The first charge detailed by prosecutors involved the arrangement of marriages of convenience to get around immigration regulations.
Prosecutors said they had wiretapped Mr Lucano's phone and recorded at least one exchange in which the mayor appeared to suggest marriage as a solution to a woman's immigration problems, in a way they said could not be misunderstood.
One excerpt concerned a Nigerian migrant who had been denied residence three times, the statement said. Mr Lucano is reported to have said that marrying an Italian citizen was "the only way forward".
As mayor, Domenico Lucano is in charge of the town's civil registry.
In the excerpts he was said to refer to a similar wedding in the past, and his ability to arrange a ceremony quickly. He was also quoted offering to acquire an ID card to say the woman was a resident of Riace.
Prosecutors said he was also charged with allocating rubbish collection services to two companies without going through the required public tender process.
That charge may also have had a connection to the town's migrant programme. The two companies were community co-operatives established "to provide work for the people of Riace and migrants", according to Italian newspaper La Repubblica.
His partner Tesfahun Lemlem had faced the same charges but was not banned from living in the area.
No abuse of funds
The most serious allegation made against the mayor was dropped at the start of October.
The investigation had originally explored alleged mismanagement of public funds provided by the interior ministry. Prosecutors said that while the management of funds may have been disorderly, there was no evidence that any amount had been misappropriated.
Italy's populist government came to power in June with the head of the right-wing League party, Matteo Salvini, taking the role of interior minister. He has since pursued a series of anti-migration policies.
Mr Salvini reacted on Twitter at the time by wondering what "all the good guys who want to fill Italy with immigrants" would say about the story.
He singled out Roberto Saviano, a vocal critic of Mr Salvini and a supporter of Riace's migration programme.
Writing on Facebook about the arrest, Mr Saviano said the government was "taking the first step towards the definitive transformation of Italy from a democracy to an authoritarian state".
Some government critics have said the mayor's only crime is one of humanity.