The number of deaths is expected to rise and according to CNN, 54 people have been injured including eight firefighters.
"The dimension of this fire was such that we don't have memory of such a human tragedy", Prime Minister Antonio Costa said as he arrived in Pedrogao Grande, a mountainous area some 200 km northeast of Lisbon.
But various local residents said they had been left to their own devices and had seen no firefighters for hours while their homes burned.
About 60 forest fires broke out across the country during the night, with around 1,700 firefighters battling to put them out.
He said: "This is a region that has had fires because of its forests, but we can not remember a tragedy of these proportions".
Dry thunderstorms may have contributed to the fires, however the cause of the blaze remains unknown.
Thirty bodies were found inside cars, with another 17 next to the vehicles, on one road leading on to the IC8 motorway.
Eleven others died nearby as a wall of flame and dense black smoke tore through the forest.
Officials Urge to Stay Cool as Heat Wave Envelops SoCal
As hot as it's expected to be, Pi said he does not believe any heat records to fall over the next five or so days. Pi encouraged Bay Area residents to drink plenty of water and to stay out of the heat as much as possible.
Portuguese media say that we are talking about one of the deadliest disasters in the history of the country.
The authorities said very low smoke clouds prevented helicopters and fire planes dropping water on the flames efficiently for most of the day.
According to the statement by Costa, firefighters had difficulty approaching the blaze as the fire was so intense.
In Kazan, Russia, Portugal's national soccer team wore black arm bands and stood for a moment of silence with the Mexican team in solidarity with the forest fire victims. "I am completely stunned by the number of deaths", Valdemar Alves, mayor of Pedrogao Grande, was quoted by AP as saying.
President of the EU Commission Jean-Claude Juncker expressed condolences to the victims' families on his Twitter.
Mariano Rajoy has tweeted that he is "overwhelmed by the tragedy at Pedrogao Grande".
Pope Francis has led thousands of people in a moment of silent prayer for the victims of the Portugal fire.
The country was hit by a series of fires previous year which devastated more than 100,000 hectares (1,000 square kilometres) of the mainland.
Fernando Lopes, head of the town hall in Castanheira de Pera near the central Portuguese city of Leiria close to where many people were killed after being trapped in their cars on a rural road, said: "This is a catastrophic situation".