© AFPA lightning illuminates the sky over Cairo.
Cairo - Four people were killed and more than 50 hurt as bad weather wreaked havoc across Egypt, pelting the capital with a freak hail storm and smashing a luxury liner into a pier, officials and media said Friday.

In the northern Mediterranean city of Alexandria, waves as high as a two-storey building pounded the coast, media reports said.

Thursday evening's hail storm in Cairo, the first in many years, caused mayhem in the capital, snarling traffic and bringing the sprawling city to a virtual standstill.

Cars crawled on the slippery roads as lightning periodically lit up the drenched streets.

The downpour followed a heat wave and caught many off guard.

Tourists near the Giza Pyramids, on the outskirts of the capital, ducked for cover from the frozen, marble-sized pellets.

In Alexandria, authorities closed down ports after winds reached 30 knots (55.5 kilometres an hour) and waves six-metre (19-feet) high pounded the shore, the daily Al-Masry Al-Youm reported.

A European luxury cruise ship smashed into a pier in the resort town of Sharm el-Sheikh early morning as the bad weather continued overnight into Friday, killing three sailors and injuring four tourists, maritime officials said.

Officials from the General Authority for Red Sea Ports said the sailors aboard the Costa Europa, an Indian, a Honduran and a Brazilian, died from the impact. They did not elaborate.

Officials said bad weather caused the crash.

The four tourists, three British women and an Italian man, were taken to hospital in stable condition.

In other weather-related casualties, media reports said that one person was killed and more than 50 injured in a spate of car collisions nationwide.

Cairo was cloudy and breezy by Friday noon, with weather experts expecting more inclement weather over the next three days.