A 16-year-old girl has been arrested in the French city of Montpellier on suspicion of plotting a terror attack.
The Paris prosecutor's office said police discovered the lab with the explosive TATP in the raid in Montpellier, southern France.
The arrests happened a week after a man was shot near the Louvre museum in Paris by a soldier.
All four suspects were under surveillance by French authorities and were suspected of preparing a "violent action", while the 21-year-old man is suspected of wanting to commit a suicide bombing. The 29-year-old Egyptian was a resident of the United Arab Emirates and had a knife with him. The interior ministry confirmed in a statement that a terror attack had been foiled. Police also found more ingredients that could have been used to produce more of the explosive.
France has been battling so-called Islamic State (IS) and other Islamist militants for the past two years.
France's top constitutional court on Friday overturned a law imposing prison sentences for consulting jihadist websites.
The French government said it prevented 17 attacks in 2016.
Risks of terrorist attacks remain high in France where a state of emergency has been declared after a group of terrorists killed 130 people in a series of explosions and shootings on November 13, 2015. The plotters had just begun making TATP, the same high explosive used in Paris and Brussels, when they were arrested, the source tells CNN.