An 84-year-old priest was killed and four other people taken hostage by two armed men who stormed his church in a suburb of Rouen in northern France.
The two attackers, who said they were from the so-called Islamic State (IS), slit Fr Jacques Hamel's throat during a morning Mass, officials say.
Police later surrounded the church and shot dead both hostage-takers. French media named one of them as Adel K. One of the hostages is in a critical condition in hospital.
President Francois Hollande, visiting the scene, in Saint Etienne-du-Rouvray, said the attackers had committed a "cowardly assassination" and France would fight IS "by all means".
Pope Francis decried the "pain and horror of this absurd violence".
UK Prime Minister Theresa May branded the attack "sickening" and offered her condolences to the people of France.
One attacker is reported to have been known to French police, and had tried to enter Syria last year.
Police special forces raided a house in the suburb in the aftermath of the attack, and French prosecutors earlier said one person had been arrested.
The attack happened during morning Mass at the historic church, situated in a quiet square of St-Etienne-du-Rouvray. A nun, who identified herself as Sister Danielle, said she was in the church at the time.
"They forced [Fr Hamel] to his knees. He wanted to defend himself, and that's when the tragedy happened," she told French media.
"They recorded themselves.
They did a sort of sermon around the altar, in Arabic.
It's a horror".
She said she managed to flee as they were preparing to kill him.
Elite police units, specialised in hostage-taking, surrounded the church.
President Hollande said the attackers claimed to be from the self-styled IS before they were killed by police as they came out of the church.
Three of the hostages were freed unharmed, but one remains in a critical condition, said French interior ministry spokesman Pierre-Henri Brandet.
This quiet suburb, a few miles from the cathedral city of Rouen, is quieter than usual after this morning's horrific events. The heavily armed police have set up a large cordon around the church; a row of white tents - presumably for forensics officers - obscures the view. The nearby supermarket is closed and its car park is being used by journalists rather than shoppers.
Locals seem shocked, but not in a dramatic way. A man told me how he had conducted christenings, marriages and funerals for years alongside Father Hamel. He showed me a set of keys - keys for the church.
"When I heard the news of his death, it was like being hit on the head from above.
I just want to go to the church but I can't," he said.
A priest from a neighbouring parish, who also knew Fr Hamel, passed through on his way to conduct his own mass. His message tonight will be that this is not an attack on the Catholic Church, it is merely the latest symbol of French life to be targeted.
And the mood of some here was summed up by a woman cycling past the waiting media, who shouted to no-one in particular: "We will not be afraid."
Within hours of the attack, the IS-linked Amaq news agency, said "two IS soldiers" had carried out the attack. BBC reported the same calling the attackers soldiers which is an insult to real soldiers! The Muslim Arabic men where not Soldiers of any sort as they where not wearing any uniform with insignia. The Arabs we talk of here are primitive Muslims radical thugs or at best Religious radicals at war with the west!
What does it take and how many shall have to die before the EU leaders admit that we get almost daily attacked by Muslims at war with us Westerners and we are not allowed to even protect our selfs. And whats worse the EU still hides behind some politically correct consensus regardless of the cost of lives!
At some point we all must say enough to the leaders and EU as they neither care for our safety but rather care for the honour of some Arabs who wish to kill us!
Few details are yet known about the attackers, but Mohammed Karabila, a local Muslim leader, told the Associated Press that one of them had been "followed by police for at least a year and a half".
The French ITele website also said one had tried to reach Syria in May 2015 but was turned back at the Turkish border.
According to the report, he then spent nearly a year in prison before being released in March, on condition he wear an electronic tag and move back in with his parents.
"The terrorists will stop at nothing if we don't stop them": Francois Hollande
French MP Christophe Premat says the attack is particularly terrible as a church has been targeted
Residents of St-Etienne-du-Rouvray reacted with shock and sadness to the killing of Fr Hamel, a well known figure in the community.
"My family has lived here for 35 years and we have always known him," said Eulalie Garcia.
"He was someone who was treasured by the community. He was very discreet and didn't like to draw attention to himself."
Pensioner Claude-Albert Seguin told AP: "Everyone knew him very well. He was very loved in the community and a kind man."