ROME (NYTIMES) - In a sort of coronavirus edition of Undercover Boss, the mayor of the northern Italian town of Asti this past week surreptitiously inspected supermarkets for the illegal sale of non-essential products.

"Naturally, I have to go in disguise," Mayor Maurizio Rasero said in a Facebook video. "So gone with the glasses, gone with the beard."

Reappearing unmonocled and clean-shaven, he put on a baseball cap and a mask, naturally. "Here we go."

The incognito mission was just the latest tactic Italian mayors have employed to get unruly residents to obey lockdown measures as Italy became a centre of the global epidemic.

They have launched insult-armed drones. They have personally confronted scofflaws on the streets. They have mocked women for getting their hair done because no one would see them in their closed caskets. They have asked all their dog-walking citizens if their pets had prostate problems.

The R-rated rebukes were part public service announcement, part performance art, part self-promotion campaign. But the mayors say they also worked.

"We needed to send a clear message, with slightly brutal language," said Mr Vincenzo De Luca, the president of Campania and former mayor of Salerno, who threatened to use a blowtorch to break up a graduation party. "We brought people back to reality."

Those profanity-infused admonitions, packaged on YouTube as municipal diss-track compilations, went viral. But the mayors have played a serious role confronting Italy's tragedy.

As the country plans to begin reopening on May 4, they say they will be critical to getting people to follow the rules as life is reorganised to avoid crowding and renewed contagions.

The role of mayors "will be even more important", said Mr Antonio Decaro, the mayor of the southern Italian city of Bari and president of the national association of mayors.

He said that throughout the crisis, mayors had done the concrete work of making sure that the poor got fed, that the quarantined got their rubbish taken out, that children left abandoned by hospitalised parents were looked after. Above all, he said, they raised the alarm.

Related Story Coronavirus: Italy to reopen some businesses as early as this week

"We became spokesmen for the threat," Mr Decaro said, adding that on his own Facebook page, he had interviewed the mayor of the hard-hit northern city of Bergamo to hammer home the danger. Unfortunately, he added, the loss of family members and friends spread the message even more effectively.

But Mr Decaro said it was a decision to relinquish power that proved most decisive.

Early in the crisis, he said, he went to Italy's prime minister, Mr Giuseppe Conte, and, with the hopes of avoiding 8,000 mayors with 8,000 different policies, asked him to strip the nation's mayors of the authority they had over local health policy.

"Take this power away from us!" he said he implored Mr Conte, who obliged.

But many mayors have also found Mr Conte's leadership has lacked the forcefulness and clarity of their own message.

Sicilian mayors have written angry letters arguing for more funds to prevent a social catastrophe. Mayors in beach towns have complained that the government has left them unprepared for the erasure of the summer tourist season.

And mayors in the hardest-hit towns in Lombardy have vented that Rome has "abandoned" them and deprived them of test kits.

Last Thursday, as the opening phase loomed, Mr Decaro joined the mayors of major Italian cities - including Rome, Milan, Naples, Turin, Florence and Venice - in a letter to Mr Conte appealing for more clarity and funds, and to let them simplify public works contracts to get things moving again.

"Trust the mayors," they wrote.

Related Story Italy sets reopening plan with harsh caveat on second virus wave

Mr Antonio Tutolo, the mayor of Lucera, in Puglia, lost it when he heard that hairdressers had visited the homes of women in his town. "Do you understand that the coffin will be closed?" he said, with a mask hanging below his chin.

In another video, he gesticulated forcefully in blue gloves as he banned evening food deliveries. "Is it really necessary to get pizza home-delivered?" he shouted.

Mr Cateno De Luca, the mayor of Messina, the Sicilian town across the straits from mainland Italy, shot to national prominence by threatening residents of his town for strolling around.

"I'll catch you tomorrow! Not in years. Tomorrow!" he screamed. Then, in an effort to stop unauthorised people from coming to Sicily, he required people to register in a database 48 hours before arriving.

The government in Rome called the measure illegal, exacerbating a war of words in which he insulted the country's interior minister with a vulgarity. After she denounced him and, he said, "made me famous", he sent her roses. He said in an interview that the entire national government "felt unmasked by a simple mayor".

This month, after discovering that people were buying bags of charcoal before Easter, he threatened those who left their balcony grills for the parks.

"We have ordered four megadrones with the voice of the mayor," he said. "They will spot those walking around and hear my voice saying, "What the (expletive) are you doing? Go home."

Mr Massimiliano Presciutti, the mayor of Gualdo Tadino, in Umbria, wanted to know: "Where are you going with these dogs with the inflamed prostates?"

Mr Decaro, the mayor of Bari, said that in the early days of the crisis, when people didn't respect police officers, he told them: "Now I'm going to call your girlfriends, or your mothers."

Related Story Interactive: How coronavirus is spreading across the world

He already had a social media following, in part because of a campaign video in which he rapped that people blamed him for everything ("If your woman is making it with your cousin, it's my fault"). Now his anti-viral vigilantism had attracted newly sprouted fan clubs of adoring women.

He found the celebrity, and that of his fellow mayors, amusing but said he hoped that soon they could all go back to focusing on potholes.

"Because it will mean that we are back to normal," he said. "Then our citizens can yell at their mayors again."