Little more than a month ago, no one had heard of Macerata. Then the murder of Pamela Mastropietro thrust the small town in central Italy onto the national stage, and the whole course of a pivotal national election was altered.

The lead suspect for the murder of 18-year-old Mastropietro happened to be Nigerian. On Feb. 3, days after the suspect’s arrest, six Africans were gunned down in Macerata by Luca Traini, said to be acting in response to Mastropietro’s death. He was draped in the Italian flag and giving the fascist salute when police arrested him, and a copy of "Mein Kampf" was subsequently found in his home. Traini had previously been a political candidate for the far-right party League, which after Sunday’s election could end up in government alongside Forza Italia, the party of former prime minister Silvio Berlusconi.

Related: Italy's euroskeptic League claims right to govern after inconclusive vote

Traini’s fascist terrorist attack in Macerata fueled one of the nastiest campaigns Italians can remember, with right-wing politicians attempting to outshout each other over the issue of immigration. Immigration might always have ended up being the hot topic, of course.

Related: This Italian city has long welcomed immigrants. Now that commitment is being tested.

Italy has received around 600,000 arrivals by sea since 2014, a phenomenon that has been seized upon by the hard-right. Fringe groups such as CasaPound and Forza Nuova have demonstrated and given hate-filled speeches, as well as smoke bombing the newspaper, la Repubblica, and carrying out attacks against foreigners. In January, League’s leader Matteo Salvini called for the deportation of more than half a million undocumented immigrants and made Trump-esque “Italy first” speeches.

Northern League party leader Matteo Salvini casts his vote at a polling station in Milan, March 4, 2018. Credit: Stefano Rellandinia/Reuters

Yet before the violence in Macerata, Salvini’s rhetoric seemed to be gaining little traction. “We thought [immigration] wasn’t going to be one of the major issues in the election,” says Sabika Shah Povia, an Italian Pakistani journalist and activist on migrant issues. “Macerata brought it up to the headlines.”

Until recently, the political mainstream on both the center-right and left had found it expedient to ignore the immigration issue. That’s because the government under incumbent Prime Minister Paolo Gentiloni, leader of the center-left Democratic party, managed to drastically reduce arrivals last year by signing controversial bilateral agreements with countries of origin. How did the Macerata murder and subsequent shooting spree push immigration to the top of the agenda again?

Povia recalls another recent case in which the body of a murdered young woman was found in the countryside: “It was discussed as a crime, which it was; the murderer was rightly condemned. And that’s it,” she says. “A few months later, a similar case happens, but this time it’s a white girl dead and a black guy that probably killed her, and suddenly the immigration debate is bounced back into the headlines. And people start to manipulate the story to get votes.”

Populist and far-right politicians made incendiary posts about the murder on their websites and Facebook pages, linking it to immigration. “Then the story went viral on social media,” says Povia, at which point, the mainstream media felt obliged to run the story, too. Before long, the case was being discussed on special edition talk shows and discussion panels on television and radio.

Step-by-step, the blame for Mastropietro’s murder spiraled away from a lone suspect. “It went from one black guy to all Nigerians. And then, finally, the blame was put on all foreigners,” says Povia.

In the space of a few days, Italy was talking about immigration again.

Soon after the Macerata shooting spree, Berlusconi doubled down on Salvini’s pledge to deport up to 600,000 undocumented immigrants. Although the 81-year-old cannot be prime minister again due to a conviction for tax fraud, he fancied himself as kingmaker after allying his party with League and the far-right Brothers of Italy. Together, the three parties hold the largest share of the vote after yesterday’s election. Now, Berlusconi’s political comeback has been eclipsed by Salvini’s League, which came second in the election behind the populist Five Star Movement, which is against coalitions. But both he and Berlusconi have greatly benefited from harnessing the furor over Macerata.

Forza Italia party leader Silvio Berlusconi holds his ballot as he prepares to cast his vote at a polling station in Milan, March 4, 2018. Credit: Stefano Rellandini/Reuters

Antonella Napolitano, communications manager for Civil Liberties in the Digital Age and co-founder of information resource OpenMigration, says that a reckless media shares a lot of the blame for the ugly election campaign.

“Some mainstream media even went as far as to say that the shooter knew and was in love with the woman when subsequent reports showed that he never met her,” Napolitano says. This all fitted with an underlying narrative that Traini’s actions were somehow justified. “Politicians started saying that the problem was actually immigration,” adds Napolitano. The leader of the Brothers of Italy, Giorgia Meloni, directly linked the shooting spree to “uncontrolled immigration.”

Napolitano thinks that the gulf between perception and reality in Italy right now is a major concern. “Every crime that is committed by a foreign person is overrepresented and gets a lot of coverage,” says Napolitano, whose organization aims to provide fact-based data, proving, for example, that foreigners do not commit more crimes. “There is also this idea that there are way more [immigrants] than there are,” she adds.

At less than 10 percent, Italy’s foreign population is lower than most EU countries. But since the refugee crisis, there is a popular feeling that the country is being swamped.

“It’s true that the numbers of people coming here have been huge, and it is a widespread opinion that Italy has not had enough help from the EU,” says Gianluca Sgueo, professor in media, activism and democracy at New York University in Florence, as well as policy analyst in the EU parliament. “It is a crisis. But the way the media talks about foreigners and particularly, social media with so many false stores, makes it difficult to have a real discussion.”

Most, including Napolitano, agree that Italy does need to have a discussion about immigration. In fact, a public debate was already underway towards the end of last year over a citizenship law that would have made it easier for children of migrants born in Italy to gain citizenship — currently, they can only apply to be Italian at the age of 18, with a one-year window to do so. Unlike the ranting and neo-fascist rhetoric of the election campaign, the citizenship law helped nurture a healthier debate about Italian identity, although it failed to pass.

“It’s like the 'Dreamers' case in the US,” Povia says, but with a difference: Italy’s "Dreamers" are children of documented migrants, born in Italy. “There are about 800,000 ‘Italians without citizenship,’ as we’re now calling them,” Povia says. These people often find themselves without citizenship and unable to vote well into their 20s.

Omayma Essamari, 19, born in Italy to Moroccan parents, is living and studying in the south of Rome with her family. Credit: Gabriel Berretta/PRI

Omayma Essamari, 19, whose parents are from Morocco, says, “I know many people born and raised here like me, maybe even with a degree already, who because of bureaucracy can’t have citizenship. I think this is discriminating.” Essamari was fortunate not to face the same problems because her father had previously gained citizenship.

“I think Italy really needs a new law on citizenship,” says Priscilla Eguono Onakpovhie, 22, born in Italy to Nigerian parents. “Nowadays, it’s a fact that the number of second-generation immigrants is rising, and so Italy must adapt to this.”

Like most Italians with foreign roots, both Essamari and Onakpovhie were dismayed by the election campaign.

“I don’t want to say that immigration isn’t a real problem … but using this inflammatory tone and slogans like ‘Italy for Italians,’ and “foreigners are criminals” — it’s something designed to stir up anger in people,” says Essamari.

“It’s all just to get a few easy votes while putting people like me in a very bad light,” says Onakpovhie. “Unfortunately, I can feel this anger rising around me.”

Despite the elections, Sabika Shah Povia, 31, who was born in Italy to Pakistani parents, is hopeful about the future. “Civil society is very strong in Italy,” she says, adding that thousands of ordinary Italians have opened their homes and volunteered to help refugees. “It’s a country that’s always welcomed people. A country that my father came to 45 years ago when nobody even knew where Pakistan was on the map,” and where he was able to build a life, in part, thanks to a generous older Italian man, who adopted Povia’s father as the “son he never had” when her father was in his 30s.

“Those are the kind of Italians I have known,” Povia says. “I know they exist. It’s just a matter of somehow bringing them out again.”