Home-made explosives similar to those used in the Paris attacks of November 2015 were discovered, police and judicial sources said.
Reports suggest the girl had made jihadist declarations online.
Since the beginning of 2015, at least 230 people have been killed in jihadist attacks in France.
Last month, a soldier received minor injuries when a machete-wielding man tried to enter the Louvre museum in Paris.
Early reports suggested that one of the Montpellier detainees was a would-be suicide attacker.