Clement Baur, 23, and Mahiedine Merabet, 29, were detained Tuesday by elite police and domestic intelligence agents in the southern city of Marseille.
Police had been searching for them since April 12 following the interception of a video in which the men pledged allegiance to the Islamic State jihadist group.
It has emerged that they had used a number of aliases, switched mobile phones frequently and used pre-paid bank cards to evade police.
“It took a while to find them,” said a source close to the investigation.
In the apartment they shared, police found a loaded Uzi sub-machine gun, two pistols, TATP explosives and a homemade grenade.
An Isis flag was also discovered.
With France going to the polls on Sunday in the first round of the presidential election, the discovery raised fears that the men were intending to attack a campaign event.
France's anti-terrorism prosecutor Francois Molins said in a press conference Tuesday that Baur had “constantly changed address” and at one point took on the identity of a Chechen jihadist from the Belgian town of Verviers, a jihadist hotbed.
The two men were “equally defiant and determined,” Molins said.
Baur was convicted in January 2015 of using false identity documents, appearing in court under yet another identity, Ismail Djabrailov, according to the prison guards' union at Sequedin jail near Lille where he served his sentence.
Radicalised in prison
While behind bars in the northern city, he met Merabet, a repeat offender with a string of convictions between 2004 and 2013 for offences including aggravated theft and drug dealing, while they shared a cell for 40 days.
Merabet was radicalised by the younger man who “had a big influence on him”, a source in the probe said.
In March 2015, Baur's family informed police that he had gone missing and had wanted to go to Syria.
They also told authorities that he practised a radical form of Islam having come into contact with the Chechen community in the southern city of Nice.
That same year he appeared in a Belgian investigation on “jihadist groups”, but the Belgian federal prosecutor's office said there was no longer any trace of him in the country by the end of 2015.
While Baur disappeared, Mahiedine Merabet came to the notice of authorities.
In December last year, investigators visited his home in the northern town of Roubaix. Merabet was not at home, but in his place was a man with false identity papers who turned out to be Clement Baur.
On April 4 this year, an envelope was delivered to police headquarters in Roubaix.
It contained a handwritten message from Merabet saying: “I give you my identity card and my bank card… I'll hand myself in soon and we'll talk then… Leave me alone, bye.”
That strange message indirectly led to his arrest 13 days later.
More than 230 people have been killed in a string of jihadist attacks in France since January 2015.