Heavy rains in Saudi Arabia's coastal city of Jeddah on Thursday delayed flights, forced school closures and shut the road to Mecca, Islam's holiest city, state media reported.

Jeddah, a city of roughly four million people located close to the Red Sea, is often referred to as the "gateway to Mecca", where millions perform the Hajj and Umrah pilgrimages each year.

Images posted to social media on Thursday showed cars being swept along streets through raging torrents of water.

The city's King Abdulaziz International Airport said that "due to weather conditions, the departure of some flights has been delayed" and urged passengers to contact carriers for up-to-date schedules.

The official Saudi Press Agency (SPA) reported before dawn that schools in the city would be closed, as rains were forecast to continue throughout the day.

Schools were also closed in the nearby towns of Rabigh and Khulais "to preserve the safety of male and female students", SPA said.

The kingdom's schools are in the middle of final exams, yet schools had already been closed nationwide on Wednesday after King Salman declared a holiday following Saudi Arabia's shock victory over Argentina in the World Cup.

Winter rainstorms and flooding occur almost every year in Jeddah, where residents have long decried poor infrastructure. Floods killed 123 people in the city in 2009.

In November 2017, Jeddah police received 11,000 calls in one morning following heavy downpours in the city.

Last year, a plunge in temperatures in Saudi Arabia also resulted in floods in many parts of Jeddah. Saudis used the hashtag #جده_الان (Jeddah now) to share videos of the extreme weather conditions, and the same hashtag was in use on Thursday.