ROME — During a visit to Moscow in 1980, Marco Minniti, a bald and bold young functionary in the Italian Communist Party, mortified his comrades by asking a Red Army general why the Soviets had occupied Afghanistan. The general pointed south on a map and explained that the faraway land mattered for his country’s national security.

Now, decades later, it is Mr. Minniti, Italy’s powerful interior minister and the hard-nosed veteran of its intelligence apparatus, who is looking south — but to Africa, which he calls the “mirror of Europe.”

A mass migration streaming up Africa, through Libya and across the Mediterranean — enabled by human traffickers and exploited by political populists — poses an existential challenge to his center-left government, not to mention his country and continent.

To stem the flow of migrants — and the potential infiltration of terrorists — Mr. Minniti, a 61-year-old former communist, is calling on his vast government experience, Calabrian brio and the sub-rosa relationships he developed as Italy’s “Lord of the Spies.”

“I know, let’s say, many things,” Mr. Minniti said with a sly smile in an interview this week in his office in Rome, surrounded by bookcases filled with tomes about espionage and religious fanaticism.

According to Nicola Latorre, an Italian senator and ally of the minister, Mr. Minniti was the “protagonist of the breakthrough” last week, when Prime Minister Fayez Serraj of Libya requested the support of Italian naval ships to counter human trafficking.

It is a risky endeavor that Italy has nevertheless sought for years, desperate to cut the migrant flow. Its success or failure now falls to Mr. Minniti, who polls show to be a popular member of a government with uncertain chances in the next election.

Some political observers have even suggested that Mr. Minniti, with his leftist background and ability to please conservatives with tough talk on security, might be a good candidate for prime minister. He has served in five center-left Italian governments, though he emphasized that he had never asked for a position. “I’ve always been chosen,” he said.

“Minniti could be a card to play,” said Marco Damilano, a prominent Italian journalist who has written often about him.

Mr. Minniti dismissed such talk. He said he was instead more focused on countering Islamic radicalism by making pacts with local imams that required them to preach in Italian, building new relationships in Africa and working with the Libyans to defeat human traffickers.

“Human relationships count a lot,” said the old spy master.

The number of migrants who have landed in Italy this year totals more than 95,000, with about 2,000 who drowned. It is a crisis that has defied nearly every attempt to solve it.

Despite a mix of appeals and threats by Mr. Minniti at European Union meetings, neighboring countries have done little to share Italy’s crushing burden.

In particular, tensions have risen with President Emmanuel Macron of France, who has resisted accepting migrants and started an uncertain peace process in Libya that, critics here say, blindsided Italy and weakened its chances of stopping traffickers by legitimizing a rival of Mr. Serraj.

Mr. Minniti said that he agreed in principle with Mr. Macron on trying to reach a peace in Libya, but that a target of 2018 would be too late for him. “I cannot wait,” he said.

He argued that smashing human trafficking networks and investing in Libyan mayors were the best ways to stabilize a porous southern Libyan border that allows migrants from traditionally Francophone African countries to pass.

As Mr. Minniti fidgeted with a silver Casio watch, representatives of humanitarian organizations met in the ministry with officials to try to agree on a new code of conduct for rescuing migrants near Libyan waters.

More than 40 percent of migrants at sea are now rescued by private aid ships, and Mr. Minniti wants to make sure those ships are not colluding with traffickers — an accusation popular among right-wing politicians, white nationalist groups and a Sicilian prosecutor.

He also insists that it is only appropriate that the Italian police be able to board those ships, which they did on Wednesday.

“My duty is to be close to those who are afraid, to reassure them, to liberate them from fear,” Mr. Minniti said, arguing that the left can no longer afford to ignore or look down on people scared by immigration or terrorism.

“I think fear is the crucial element of the next 10 years in democracy,” he said. “In Italy and all the world.”

That law-and-order talk has been too much for some of Mr. Minniti’s old comrades on the left. (One left-leaning newspaper suggested that Mr. Minniti thought he was Batman.) But the intense and abstemious minister said service to the state was in his blood.

His father was one of nine brothers to make a career in the military. In high school in Reggio Calabria, he developed a love of the ancient poet Catullus.

But his true passion was for the skies. He hoped to follow his family’s tradition by becoming an air force pilot. Instead, his mother put her foot down, saying the family had already given enough.

Mr. Minniti said he took the ban badly. (The shelves of his office still display the models of the jets he once hoped to fly.)

In an act of rebellion, he studied philosophy at the University of Messina. He wrote his thesis on the Georgics of Virgil, and to help understand the exploitation of slaves in the ancient Roman fields, he said “I used Marx.”

Those studies helped bring him closer to the Communist Party, and when he graduated, he said, his father showed how proud he was of his communist philosopher son “when he didn’t show up.”

But that opposition only fueled Mr. Minniti’s conviction as he sought to stand up for the country’s democratic values in dangerous sections of Calabria ruled by one of Italy’s feared mafias, the ’Ndrangheta (pronounced n-DRAHN-ghe-ta).

In 1980, Mr. Minniti, a free-diving enthusiast, was trying on a swimsuit when he received word that a friend in the Communist Party had been gunned down by the mob. It fell on him to tell his comrades’ parents.

In the 1980s, he began working closely with the Communist Party’s rising star, Massimo D’Alema. In the early 1990s, Mr. Minniti — by then married to a musician, Mariangela, with whom he has two daughters — moved with Mr. D’Alema to form a new political party.

When Mr. D’Alema became prime minister in 1998, he brought Mr. Minniti in as his right-hand man. The young aide worked at a desk once used by Benito Mussolini, and less than a month into his tenure answered a secure phone in his bedroom.

“I was convinced it would never ring,” he said.

The Italian authorities had stopped Abdullah Ocalan, leader of the Kurdistan Workers’ Party, who was considered a terrorist by many, as he entered Italy. Mr. Minniti ordered his arrest, setting off on a crash course in international intelligence operations and spy craft.

The experience — followed almost immediately by his crucial role in the Italian intervention in Kosovo — gave him a taste for security work.

In 1999, he made his first visit to Libya, a former Italian colony, and began to learn about its disparate centers of power. Today he rattles off the names of Libyan towns where traffickers loom, places that he says he knows better than his native Calabria.

But whether that deep experience can resolve Italy’s endless migrant crisis remains a long shot. Already, like with an earlier agreement with the Libyans that Mr. Minniti helped broker, not all has gone according to plan.

Early in the planning, a competing Libyan leader, Gen. Khalifa Hifter — whom Mr. Macron has included in peace talks — has threatened to bomb the Italian navy’s ships. The Italian ambassador in Tripoli responded that such threats were useless and that the Italian mission would go ahead.

Mr. Minniti’s ministry — eager to show its strategy is working — has latched on to a dip in the number of migrants arriving in Italy compared with last year.

The minister himself knows skepticism is high and said that when he first broached dealing with Libya, which lacked an empowered interlocutor with whom to negotiate, critics “laughed in my face.”

What he does understand, he said, is that such instability means anything can happen at any time and that any deal could blow up. “But we have built a path.”

A version of this article appears in print on , on Page A7 of the New York edition with the headline: Italy’s ‘Lord of the Spies’ Takes On a Migration Crisis. Order Reprints | Today’s Paper | Subscribe