Three soldiers on patrol outside a Jewish community centre in southern France have been attacked by a knife-wielding assailant, leaving two of them injured, AFP news agency reported.

Sarah Baron, a police union official in the city of Nice, said on Tuesday that the assailant was detained after the attack near the Galeries Lafayette department store.

Nice Mayor Christian Estrosi said the attacker had an identity card with the name Moussa Coulibaly.

The surname, which is relatively common for families of Malian descent, is the same as that of the man who seized hostages in a kosher supermarket in Paris and gunned down a policewoman last month.

Al Jazeera's Jacky Rowland, reporting from Paris, said that the suspect has no relation to the previous gunman.

Our correspondent also reported that another person is being questioned by police.  

"They are treating this as a potentially terrorist incident," she said, quoting French authorities.  

Another police official said the attacker pulled a knife at least 20 centimetres long out of a bag and set upon one of the soldiers, injuring him in the chin. He then swiped two other soldiers - one in the cheek, the other in the forearm - before being apprehended by riot police stationed near the building, which houses the city's Jewish community centre.

A manager at the centre, who did not want to be identified because she was afraid, confirmed soldiers posted in front of the building were attacked. She said it happened around lunchtime and no one was inside the office.

The attacker, aged about 30, had a record of theft and violence, the official said on condition of anonymity because the investigation was ongoing. His motive was not yet clear, the official added.

Arrests made

Earlier in the day, French police arrested eight people suspected of involvement in a network that allegedly sent people to Syria to join the war against the government, the interior minister said.

Bernard Cazeneuve told reporters on Tuesday that the suspects were arrested around the capital, Paris, and the southeastern city of Lyon.

A security source told AFP news agency that the group arrested comprised "seven men and a woman, aged between 21 and 46."

"Three of them have already travelled to Syria and came back in December," this source added.

The suspects are of Turkish and north African origin and are "part of a wider network", members of which travelled to Syria in three waves last year, the source said.

About 1,400 people living in France have either joined the "jihad" cause in Syria and Iraq or are planning to, Prime Minister Manuel Valls said last month.

Source: Al Jazeera and agencies