Government official Pedro Ramos said 52 others were injured in the accident on Tuesday near the island capital of Funchal.
The tree fell while a large crowd was gathered as part of a traditional religious festival.
The Nossa Senhora do Monte festival is the island’s biggest annual festivity.
It is held on 14 and 15 August and draws large crowds to a church on the outskirts of Funchal.
Portugal’s prime minister expressed his condolences. Antonio Costa tweeted: “I express my condolences for the victims of the accident in Madeira.”
He added that his “thoughts are with the family and friends of the victims”.
Costa said that the central government has made contact with local authorities on the island to offer its support.
He said that “the government has provided medical support given the high number of victims”.
RTP public television showed images of emergency workers gathered under a group of tall trees on the Atlantic island.
Ambulances were shown pulling away from the site while workers wielding chainsaws cut away limbs from an enormous tree on the ground.
More televised images showed some people attending to the injured. Others appeared visibly shaken.
The regional government of Madeira has declared three days of mourning for the victims.
Local media reports said that the tree was an oak that was more than 200 years old.
Ramos said that seven people had serious injuries and that of the 12 fatalities, 10 people died at the site of the accident. A child died en route to a local hospital, where another woman also died.
Meanwhile, the president of Portugal made a flying visit to Madeira in the aftermath of the tree collapse, saying this was “time for pain” and not to find culprits yet.
Marcelo Rebelo de Sousa said on arriving at Funchal hospital, where 16 people are still hospitalised, that only a few hours after the tree fell on a procession of pilgrims in Largo da Fonte, it was “time for pain”.
After what has happened, the relevant regional authorities will assess liabilities or open inquiries, that is not the president’s job, he told reporters.
Ten people were killed at the location, while three others, a child and two adults, died in hospital.
Meanwhile, the public prosecutor has said it has already opened an inquiry into the 13 deaths in Largo da Fonte, with some people saying the tree had been a risk for years and that it had been shored up and the trunk was hollow, while others said there was no apparent risk.