The Category 1 storm - centered 300 kilometers (180 miles) southwest of Lisbon early Saturday, local time - had been spawned in the western Atlantic two weeks ago before heading toward the Iberian Peninsula.
Winds sent trees crashing on to cars and pavements in the Portuguese capital and in the northern city of Porto.
By Sunday morning the powerful winds and heavy rains had mostly subsided.
Previously predicted that the storm Leslie formed on 23 September will be the strongest for Portugal over the last 150 years.
"The greatest danger has passed", Costa said.
At Mealhada, in Aveiro district, the roof blew off an indoor sports stadium putting an end to the European final of the women's roller hockey competition. In the country cancelled many flights.
Maritime authorities advised fishermen now at sea to return to the nearest port and Portugal's TAP airline cancelled seven flights to and from Lisbon.
Through the strong wind, hundreds of people were trapped after a concert in the arts centre Figueira da Foz. The main A1 motorway was among the roads temporarily blocked. "People are very alarmed".
A lifeguard watches at Carcavelos beach before hurricane Leslie arrives in Portugal.
Over the past 176 years, only Hurricane Vince has made landfall on the Iberian peninsula, hitting southern Spain in 2005, according to weather records cited by experts. Only five are on record, including Hurricane Ophelia whose air mass fueled forest fires in Portugal and Spain in 2017.
Earlier this week, 12 people were killed in flash floods on the Mediterranean island of Mallorca.