Antonio Costa tweeted his "deepest regret for the victims ... and a word of encouragement and strength for all who help combat this scourge."
He added "I am so thankful to the firefighters and other professions who are giving their all for the security of each of us by fighting the fires."
Also, Spain says it is sending two water-dumping aircraft to help neighboring Portugal fight the blaze that has raged since Saturday night.
Prayers for Portugal
Pope Francis has led thousands of people in a moment of silent prayer for the victims of the Portugal fire.
Francis referred to the "devastating fire" at the end of his Sunday prayer, delivered from his studio window overlooking St Peter's Square.
The crowd fell silent and Francis bowed his head to recall the "many victims" of the blaze.
Francis visited the Portuguese shrine of Fatima last month.
Portugal's soccer team has expressed its condolences for the victims of forest fires that have claimed at least 57 lives.
The team's players, including star Cristiano Ronaldo and coach Fernando Santos, signed a statement saying "in this sad hour we send our deepest sympathies to the families, friends and loved ones of the victims of the fires."
Portugal's team is in Russia, where it is set to start the Confederations Cup later on Sunday against Mexico.
EU 'ready to help'
The European Union has activated its civil protection efforts to help Portugal fight the forest fires.
The EU Commissioner for Humanitarian Aid and Crisis Management Christos Stylianides expressed his condolences for the victims in a statement, saying the "EU is fully ready to help."
Stylianides says that in response to a request for help by Portugal, Spain and France are both sending aircraft to help fight the flames.
France is sending three planes, while Spain has sent several firefighting aircraft.