Gentiloni told the Senate on Wednesday that no ransom was paid for Gino Pollicardo, 55, and Filippo Calcagno, 65, who arrived back in Italy on Sunday.
They were among four employees of the Italian construction firm, Bonatti, kidnapped in the Millitah region, west of Tripoli.
The other two – Salvatore Failla, 47, and Fausto Piano, 60 – were killed on Thursday in clashes between jihadists and militiamen.
Calcagno and Pollicardo, who had been separated from their colleagues, managed to set themselves free on Friday after Calcagno loosened the lock of a door using a nail.
He told reporters from his home in Sicily on Sunday that the door eventually opened after several attempts.
“It was not easy,” he told Sky TG24.
“But I worked a lot on that door. I understood that you can do many things with a nail.”
After the lock was loosened, Pollicardo, from Liguria, helped to kick the door down. They then found a second door, which was unlocked, and walked out onto the street.
Calcagno said the four colleagues were separated on March 1st, with captors indicating that a deal had been reached.
“We were told it was over,” he said, adding that the men had endured “beatings, thirst and hunger” during almost nine months in captivity.
“Failla and Piano were taken away while we remained inside.”
Italian media reports said Piano and Failla had been in an Isis group convoy that was attacked by militiamen from Fajr Libya (Libya Dawn), the armed wing of the non-recognized government based in Tripoli.
But Gentiloni said there was no evidence that Isis was involved in the abduction, adding that “the most probable hypothesis” is that pro-Islamist criminal groups operating between Mellita, Zuwara and Sabratha were behind the kidnapping.
He also downplayed reports that Italy was readying to take part in an international mission against Isis militants in Libya, saying that Italy would only get involved if requested to by Libya, and with the approval of Italy’s parliament.
“We need to avoid Libya sinking into chaos where tragic episodes like this one involving our hostages can proliferate,” he said earlier this week.