The attack took place in a church, the Notre-Dame Basilica, on Thursday. The victims include one woman who had her throat slit, a police source told CNN.
Nice's mayor, Christian Estrosi, earlier described the woman as having been "decapitated."
The police source told CNN that another victim was a man who died after being stabbed multiple times. The third casualty was a woman who was wounded inside the church but managed to leave the scene. She died in a nearby café, the source added.
Estrosi said the attacker was shot by police, but is still alive and has been taken into custody. "I am on the scene with the police who arrested the attacker. Everything points to a terrorist attack," the mayor said on Twitter Thursday morning.
The attacker kept repeating the words "Allahu Akbar" -- Arabic for "God is greater" -- while being treated by medics, Estrosi said.
"There is no doubt that the perpetrator of the attack... what his intentions were," he added.
France's Interior Minister Gérald Darmanin said he was chairing a crisis meeting at the ministry in response to the attack. President Emmanuel Macron will travel to Nice after attending that meeting, the Élysée Palace said.
France's anti-terror prosecutor has taken on the investigation into the attack, a spokesperson for the prosecutor's office said.
"It seems that, according to the first findings of the police, the woman who was inside the church has been decapitated. For the other victims, we cannot say anything at the moment," Estrosi told French news channel BFMTV earlier.
Eric Ciotti, a French lawmaker who represents the city of Nice and surrounding area in the National Assembly, said the whole of France was in mourning on Thursday.
"Like a symbol, the Notre-Dame basilica is still ringing. It is our country and its history that are hit today in Nice," he said on Twitter, in a post that shared a video of church bells. Ciotti added: "Islamist barbarism will never silence us!"
The attack comes just weeks after Samuel Paty, a high school teacher, was beheaded in a terrorist attack in Paris.
Paty was killed after showing controversial cartoons of Islam's Prophet Mohammed during a lesson on freedom of expression.
Turkish President Recep Tayyip Erdogan and Pakistani Prime Minister Imran Khan criticized Macron and retailers faced calls to boycott French goods in Kuwait, Qatar and Jordan.
The Turkish Foreign Ministry said Thursday that the country "strongly condemns" the Nice attack. In a statement, the ministry offered its "condolences to the relatives of those who lost their lives."
The French Council of the Muslim Faith strongly denounced Thursday's attack and called on French Muslims to cancel Thursday's Mawlid celebrations.
Mawlid is celebrated by some Muslims to mark the birthday of the Prophet Mohammed.
"I strongly condemn the terrorist attack that took place near the Notre-Dame Basilica in Nice. As a sign of mourning and solidarity with the victims and their families, I call on the Muslims of France to cancel all the Mawlid festivities," the council stated in a post on its Twitter account.
In a separate incident in Saudi Arabia on Thursday a man was arrested after attacking a guard at Jeddah's French consulate with a sharp tool, according to the kingdom's state media.
The guard sustained minor injuries and was taken to a hospital, state media added.
Politicians, officials and organizations across Europe have condemned the Nice attack.
The President of the European Parliament, David Sassoli, said he was deeply saddened by the incident. "This pain is felt by all of us in Europe," he said on Twitter.
"We have a duty to stand together against violence and those that seek to incite and spread hatred."
Spanish Prime Minister Pedro Sanchez offered his "deep sympathy and solidarity" to those affected.
"We will keep defending freedom, our democratic values, peace and security of our citizen. United in face of terror and hatred," he said on Twitter.