He said that "contact" had been made with the kidnappers but gave no further details on that, the arrests or the troop searches.
Despite Gandhi's assertions, no group has yet claimed responsibility for the abduction of the two men, described by Paris as security consultants, who were abducted on Tuesday.
The two were taken from their hotel rooms by armed men, some of who were reportedly wearing government uniforms.
One high-ranking Somali security official was reported by the AFP news agency as saying that the kidnappers belonged to the interior ministry, suggesting the incident might be the result of dissension within the country's security apparatus.
Later reports from the Reuters news agency said that the French agents had been handed over to an anti-government group after being abducted by a pro-government faction.
Reuters quoted Abdiqadir Odweyne, a senior police officer, as saying that two anti-government groups, Hizbul al-Islam and al-Shabab, which Western security services say is an al-Qaeda proxy, were arguing over the fate of the hostages.
"Al-Shabaab wants to take the Frenchmen from Hizbul [al-]Islam, they are on the verge of fighting," said Odweyne.
"Al-Shabab wants to kill the Frenchmen and Hizbul [al-]Islam refuses. The situation is not good."
In a statement issued on Tuesday, the French foreign ministry said that the two abductees were on a mission to provide security assistance to the forces of Sharif Sheikh Ahmed, Somalia's president, whose administration controls only a limited area of Somalia.
Around 500 Somali forces are to be trained in Djibouti, home to France's largest overseas military base and the only US army base on the African continent.
The training, initially set to begin in September, was brought forward by one month due an escalation of violence in Somalia.
The two French agents are thought to have posed as journalists, which has outraged the few foreign correspondents in the region.
"If this is confirmed, it is shocking because these are official agents on a mission for the French government who have used the title of journalist as a cover," Jean-Francois Julliard, the head of Paris-based Reporters without Borders, said.
Only a few correspondents still travel to Somalia, employing dozens of security guards when they do.