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 chaired a crisis meeting at the ministry in response to the attack. French President Emmanuel Macron arrived in Nice with Darmanin on Thursday afternoon, following the meeting.
Macron's office said he would meet security personnel and rescue teams at the scene, as well as with Estrosi and local lawmakers.
French Prime Minister Jean Castex said the country's terror alert level was being raised to "emergency," in the aftermath of the attack.
The "emergency" level means the "maximum level of vigilance" is necessary in case of an imminent threat or immediately after an attack, according to a French government website.
Castex added that the government's response would be "firm, implacable, and immediate."
France's anti-terror prosecutor has taken on the investigation into the attack, a spokesperson for the prosecutor's office said.
Nice has been the target of terror in the past. In 2016 dozens died after an ISIS-inspired attacker plowed a 20-ton truck into Bastille Day crowds.
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.
Macron subsequently issued a strong defense of the principle of freedom of speech and said France would not "give up" the caricatures, which were published in satirical magazine Charlie Hebdo.
The cartoons are considered blasphemous in Islam. Macron's comments triggered widespread anger in many Muslim-majority countries.
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.
Saudi Arabia, the UAE and Egypt also condemned Thursday's deadly knife attack.
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.