· Travel  · 4 min read

A Hologram for the King Filming Locations in Morocco

Discover the real Morocco filming locations of A Hologram for the King with Tom Hanks, from Ouarzazate's desert to Casablanca's coast.

Discover the real Morocco filming locations of A Hologram for the King with Tom Hanks, from Ouarzazate's desert to Casablanca's coast.

When Tom Hanks stepped onto a dusty Moroccan highway in A Hologram for the King, the production had pulled off something remarkable: making Morocco look like Saudi Arabia. Directed by Tom Tykwer and based on Dave Eggers’ novel, the film sent Hanks’ character Alan Clay on a doomed corporate pitch across the Middle East — but the real magic happened in four Moroccan cities, not one.

In this guide, we will break down every A Hologram for the King filming location in Morocco and show you how to visit them yourself.

Ouarzazate — The Desert That Played Saudi Arabia

Ouarzazate is listed as the primary filming location on IMDB, and for good reason. Known as the “door of the desert,” this legendary film hub has hosted productions from Lawrence of Arabia to Game of Thrones. For A Hologram for the King, Ouarzazate’s vast desert landscapes doubled as the Saudi Arabian terrain where the fictional King’s new city was being built.

The production used Ouarzazate as its anchor location. The surrounding desert provided the barren, sun-bleached terrain needed to sell the Saudi setting. The nearby UNESCO World Heritage site of Ait Benhaddou, an ancient fortified village, sits within driving distance and has appeared in countless Hollywood films.

What you will find in Ouarzazate:

  • The Atlas Film Studios, one of the world’s largest film studios
  • Kasbah Taourirt, a historic fortress in the city center
  • Endless desert vistas stretching toward the Sahara
  • The proximity to Ait Benhaddou and the Dades Valley

Laayoune — The Empty Highway Through the Desert

In the film, Alan Clay drives along a vast, empty road through a desert landscape. That highway was not in Saudi Arabia — it was in Laayoune, the capital of Western Sahara. The low traffic volume made it ideal for filming, allowing the crew to work with minimal road closures.

The production also shot desert cabin and tent scenes in the Laayoune area. A small cabin and black tent were built to match the story’s desert outpost setting. Laayoune’s stark, open terrain gave the film the desolate beauty it needed for these transitional sequences.

Key details about Laayoune:

  • Highway scenes filmed on empty desert roads
  • Cabin and tent sequences shot with minimal infrastructure
  • The location offered low traffic and wide-open desert

Rabat and Casablanca — Building a Fictional City

The film’s most innovative technique involved Rabat and Casablanca. The Institut Royal de la Culture Amazighe in Rabat served as the hospital where Alan Clay meets Dr. Zahra, played by Sarita Choudhury. Meanwhile, Casablanca’s Hassan II Mosque and the Casa Marina development site were used as background elements.

These two cities were not filmed separately — they were composited together. Four different elements from Laayoune, Casablanca, Rabat, and Ouarzazate were shot over six weeks to create one composite location. The background buildings from Rabat were merged with construction site footage from Casablanca to build the fictional Saudi construction project. Rabat is also a UNESCO World Heritage Site, adding architectural richness to every shot.

Morocco as Saudi Arabia — The Composite Puzzle

Director Tom Tykwer and Kasbah Films’ Michael Dreher described the production as “a puzzle.” Rather than filming in Saudi Arabia — where non-Muslim crew members could not enter Mecca — the team created the illusion of a Saudi city entirely in Morocco.

The process involved shooting scenes across multiple cities and merging them in post-production. Scenes of Tom Hanks driving through Mecca were actually filmed in Morocco, with Muslim crew members capturing real Mecca footage separately. The two elements were then combined to create a seamless whole.

What made the composite approach work:

  • Ouarzazate provided desert landscapes and wide-open terrain
  • Laayoune contributed highway and road sequences
  • Rabat offered institutional architecture for the hospital scenes
  • Casablanca supplied the construction site and coastal elements

The production service company Kasbah Films orchestrated this complex location strategy, using Morocco’s 20% cash rebate to make the ambitious shoot economically viable.

Plan Your Own Hologram for the King Tour

Visiting these filming locations means experiencing four distinct sides of Morocco — from the desert gateway of Ouarzazate to the coastal capital of Rabat. A private tour can weave these cinematic sites into a seamless itinerary, combining film history with authentic Moroccan culture.

For a desert-focused trip through Ouarzazate’s film locations, our 4-Day Morocco Desert Tour from Ouarzazate covers the Atlas Film Studios, the desert landscapes, and the cultural highlights of southern Morocco.

If you want to explore both Rabat and the northern imperial cities, our 8-Day Northern Tour: Imperial Cities & Desert from Tangier takes you through Rabat’s historic sites and beyond.

We can customize a tour to match your needs — design your perfect itinerary

If you found this helpful, add us as your preferred source on Google.

Frequently Asked Questions

Where was A Hologram for the King filmed in Morocco?

A Hologram for the King was filmed across four Moroccan locations: Ouarzazate, Laayoune in Western Sahara, Rabat, and Casablanca. Each city contributed different elements that were composited together to create the fictional Saudi Arabian setting.

Did Tom Hanks actually film in Saudi Arabia?

No, Tom Hanks did not film in Saudi Arabia. The production used Morocco as a stand-in for Saudi Arabia, blending footage from multiple Moroccan cities. Scenes of Hanks driving through Mecca were actually shot in Morocco, with separate Muslim crew members filming real Mecca footage.

What Moroccan cities appear in A Hologram for the King?

Four Moroccan cities appear in the film: Ouarzazate provided the desert landscapes, Laayoune contributed highway and desert cabin scenes, Rabat served as the hospital location, and Casablanca's Hassan II Mosque appeared in composite construction site shots.

Can you visit the A Hologram for the King filming locations?

Yes, all four filming locations are accessible to travelers. Ouarzazate and Casablanca are popular tourist destinations, while Rabat and Laayoune offer authentic Moroccan experiences. A private tour can connect you to these cinematic sites.

Ready for an Adventure?

Have questions? Feel free to contact us using the form below. We're here to help!

  • Email us

    moroccoamazingdestination@gmail.com

  • Call us

    +212 605 67 95 37 / +34 634 22 58 83

  • Follow us

    @moroccoamazingdestination

Back to Blog