Four people have been arrested in and around the southern French city of Montpellier on suspicion of planning an imminent terrorist attack in France.

Police and judicial sources said those in custody included a 20-year-old man and his 16-year-old girlfriend, both known to authorites for connections with radical Islam, and said the attack had been due to take place in Paris.

Police found TATP explosives and other bomb-making materials in the man’s home, the sources said. The interior ministry confirmed that explosives had been found.

France, which will hold the first round of a presidential election in just over 10 weeks’ time, remains on high alert over possible Islamist militant attacks.

More than 230 people have died in a series of assaults since the beginning of 2015, and the country has been in a state of emergency since November that year.

“The initial indications are that an imminent attack on French soil has been thwarted,” the interior minister, Bruno Le Roux, said in the statement on Friday.

The government has said it foiled 17 attacks during 2016. In July, 86 people were killed when a man deliberately drove a truck into a crowd in the city of Nice.

On Friday, a makeshift memorial was being dismantled in Nice ahead of a carnival that was due to begin on Saturday.

Separately, a top French judicial body ruled as unconstitutional a law that aimed to catch would-be Islamist attackers. The law, which bans people from regularly consulting jihadi websites that encourage “acts of terrorism”, was brought in last June.

Last Friday, a man was shot and seriously wounded when he attacked soldiers with machetes outside the Louvre museum in central Paris.