Italy’s most famous fictional detective has delivered a pro-migrant message on TV, angering supporters of the far-right deputy prime minister, Matteo Salvini.

In a scene from a new episode of the TV series Inspector Montalbano that aired in Italy on Monday night, the Sicilian investigator, played by the Roman actor Luca Zingaretti, jumps into the sea to recover the body of a migrant who drowned attempting to reach the shore.

In another scene, he shouts to his colleagues: “Enough with the tale of Isis terrorists travelling on a migrants’ boat.”

The episode reached an audience of 11 million viewers and caused a heated controversy. Within a few hours, the hashtag #Montalbano became one of the most popular on Italian Twitter. While many supported the inspector, thousands attacked him. “Stop with the pro-migrants propaganda,” wrote one user.

Zingaretti, whose brother Nicola is the president of the Lazio region, where Rome is located, would not comment on the episode.

The programme’s detractors should not have been surprised. Migrants have always been a central theme in the Montalbano novels, written by the Sicilian writer Andrea Camilleri, 93.

“I have written about their desperation,” Camilleri said in a recent interview aired on the national broadcaster Rai. “These are people who have escaped from wars. Italy is fast becoming a country that is moving backwards, similar to the way shrimps do. The consensus around Salvini reminds me of the one around Mussolini.”

Salvini, who knows Montalbano is one of the most loved Italian characters, appears to have opted not to pick a fight. “I love Montalbano,” he tweeted on Monday night.

Montalbano is the first Italian series sold abroad successfully, and has been broadcast in more than 65 countries including the US and Iran.