SAINT-ETIENNE-DU-ROUVRAY - The Islamic State group said Tuesday that two of its "soldiers" had attacked a French church, slitting a priest's throat in a country stunned by a series of militant attacks.

The hostage drama in the Normandy town of Saint-Etienne-du-Rouvray comes with France already shaken to the core after a massacre in the French Riviera city of Nice less than two weeks ago, which left 84 people dead and was also claimed by IS.

President Francois Hollande said the two men who stormed a church before killing the elderly Catholic priest had claimed allegiance to the Islamic State group before being shot dead by police.

Shortly afterwards the IS-linked Amaq news agency, citing a "security source", said the perpetrators were "soldiers of the Islamic State who carried out the attack in response to calls to target countries of the Crusader coalition".

The two attackers stormed the church during morning mass, taking the five people inside hostage, including the priest, interior ministry spokesman Pierre Henry Brandet said.

He said the church was surrounded by polite from the elite BRI unit, which specialises in kidnappings, and that "the two assailants came out and were killed by police". The priest died after his throat was slit, sources close to the investigation told AFP.

The archbishop of the nearby city of Rouen, Dominique Lebrun, named him as 84-year-old Jacques Hamel, although the website of the archdiocese states he was born in 1930. Three of the hostages were freed unharmed, and another was fighting for their life, said Brandet.

France remains on high alert after Mohamed Lahouaiej Bouhlel, a Tunisian national, ploughed a truck into a crowd of people celebrating Bastille Day in Nice on July 14, killing 84 people and injuring over 300.

Hollande appealed for "unity" in France, where political blame-trading has poisoned the aftermath of the truck attack, the third major strike in the country in 18 months. "The threat remains very high," said Hollande. "We are confronted with a group, Daesh, which has declared war on us," Hollande said, using an alternative name for IS.

"We have to wage war by every means, (but through) upholding the law, which is because we are a democracy."

The Paris prosecutor's office said the case was being handled by anti-terrorism prosecutors.

Pope Francis voiced his "pain and horror" at the "barbaric killing" of the priest.

France has been a prime target of IS, which regularly calls for supporters to launch attacks against the country, a member of the international coalition carrying out air strikes against the militant group in Iraq and Syria.

Attacks in Belgium in March, and in Germany this week, have also increased jitters across Europe.

After Nice, France extended a state of emergency giving police extra powers to carry out searches and place people under house arrest for another six months until January.

It was the fourth time the security measures have been extended since IS militants struck Paris in November, killing 130 people in a wave of bombings and shootings at restaurants, a concert hall and the national stadium.

Valls had warned earlier this week that France will face more attacks as it struggles to handle extremists returning from jihad in the Middle East and those radicalised at home by devouring propaganda on the internet.

France has been concerned about the threat against churches ever since Sid Ahmed Ghlam, a 24-year-old Algerian IT student, was arrested in Paris in April last year on suspicion of killing a woman who was found shot dead in her car, and of planning an attack on a church.

Prosecutors say they found documents about Al-Qaeda and IS at his home, and that he had been in touch with a suspected militant in Syria about an attack on a church.

As part of beefed up security operations in France, some 700 schools and Jewish synagogues and 1,000 mosques are under military protection.

However with some 45,000 Catholic churches, and thousands more Protestant and evangelical churches, protecting all places of worship is a massive headache for security services.

The Nice massacre triggered a bitter political spat over alleged security failings, with the government accused of not doing enough to protect the population.

French far-right National Front leader Marine Le Pen wrote on Twitter that the "modus operandi obviously makes us fear a new attack from terrorist Islamists."