A gunman on a motorbike shot dead three children and a teacher at a Jewish school in Toulouse on Monday, just days after apparently killing three soldiers nearby, prompting President Nicolas Sarkozy to say France should not give in to terror.

With the attacker still on the loose, police stepped up a manhunt in the city of a million people in southwestern France and prosecutors opened anti-terrorism investigations, although it was not clear whether the motive was political or racist.

The soldiers, one of Caribbean and two of Muslim origin, were also killed in drive-by shootings, which a spokeswoman for the prosecutors' office said appeared to have been carried out by the same man.

At the Ozar Hatorah school in an leafy residential neighbourhood in Toulouse, the gunman killed a 30-year old Hebrew teacher, his children aged three and six, and another child, the 8-year-old daughter of the school's principal, who died in her father's arms as medics tried to resuscitate her. A 17-year-old boy was also wounded.

He came on his motorbike, got off and shot a bullet in the air... Then he got out another gun and started shooting at everyone, at the children. He chased us into the school, Baroukh, a Jewish man living nearby who had come for morning prayers, told Reuters, declining to give his family name.

Video surveillance footage showed the gunman shooting one child at close range in the head, before fleeing on a motor bike, said Nicolas Yardeni, regional head of the French Jewish umbrella association, CRIF.

It was the worst anti-Semitic incident in France since August 1982, when six people were killed in a grenade attack and subsequent shooting at the Goldenberg restaurant in a Jewish neighbourhood of central Paris. France's 600,000-strong Jewish community is Europe's largest.

Sarkozy and Francois Hollande, the Socialist opposing him in his uphill bid for re-election in May, both rushed to the scene.

Babarity, savagery and cruelty cannot win, hate cannot win. The republic is much stronger than all this, Sarkozy said.

Our schools must keep functioning, our compatriots that want to worship at synagogues, mosques and churches must be able to continue to do so. We should not give ground to terror, said Sarkozy, announcing a moment of silence in schools on Tuesday.

A police source told Reuters that the gun used in Monday's school shooting was the same one used to kill the three soldiers by a lone gunman who also escaped on a motor bike.

More than 200 investigators were working on a manhunt for the killer and had already identified the licence plate of the motor bike used in Monday's attack, police sources said.

Police cordoned off the school, where well-wishers had begun to lay wreaths of flowers and mourners were planning an all-night vigil. A spokesman for the interior ministry said security was being tightened at all other Jewish schools in the country, some of which already take security precautions.

HORROR

I saw two people dead in front of the school, an adult and a child ... Inside, it was a vision of horror, the bodies of two small children, one father, searching for his son at the school among crowds of distraught parents and children, told RTL radio.

How can they attack something as sacred as a school?

As messages of condolence poured in from across Europe, representatives of France's Jewish community voiced their solidarity.

The whole Jewish community is in mourning, said Rabbi Moshe Lewin, a spokesman for France's chief rabbi. In the face of such a drama, such a horror, one cannot but go there.

A spokesman for Israel's foreign ministry called on the French authorities to shed full light on this tragedy and bring the perpetrators to justice.

Public prosecutor Valet said investigators were studying video evidence from the school shooting and the attack on Thursday in the nearby town of Montauban that killed two soldiers and left a third seriously injured.

The three men, aged between 24 and 28, were shot while in uniform as they tried to withdraw money from a cash machine close to the barracks of the 17th parachute regiment. In the wake of the attack, French media reported that two members of the regiment had been expelled for neo-Nazism in 2008.

A third soldier, aged 30, was killed the previous weekend in Toulouse.

The shootings could thrust security back to the top of the agenda in a bitter electoral campaign that has been dominated by issues of taxation and immigration.

This is not just one school, Jews, or just one city which have been affected but all of France, Hollande said in Toulouse.

Stephane Rozes, head of CAP political consultancy, said the shootings were unlikely to have a decisive impact on the election outcome as all candidates had strongly condemned the violence, including far right leader Marine Le Pen.

Le Pen said politics and the election campaign should be kept out at times like this. There is no more right or left, there is only the French people, wounded in its heart.

In the past decade, there has been a string of attacks on synagogues and Jewish schools, which educate some 30,500 children in France.

The Ozar Hatorah, or Treasure of the Torah, network of schools was founded in 1944 and flourished in France from the late 1960s, following immigration of North African Jewish communities after the Six-Day War.

(Reporting by Guillaume Serries and John Irish in Toulouse; Leigh Thomas, Thierry Leveque, Nicolas Bertin, Lionel Laurent and Chine Labbe in Paris; Jeffrey Heller and Maayan Lubel in Jerusalem; writing by Daniel Flynn and Geert De Clercq)