(CNN) In the new comedy " Army Of One ", Nicolas Cage plays an American civilian who tries to hunt down Osama Bin Laden after an encounter with God, played by Russell Brand.

The backdrop to the story is the slums of Pakistan's capital Islamabad. Here, Cage navigates the city's narrow back streets through loud traffic and buzzing markets on the back of a donkey, as seen in the recently released trailer

It's the perfect South Asian scenery.

Except, the film was shot thousands of miles away, in Morocco's Marrakesh and Ouarzazate (pronounced Wa-za-zat), a home from home for Hollywood directors looking to recreate a host of landscapes without any of the risks, costs and nightmarish logistics of filming in other, perhaps more suitable countries.

A safer alternative

Leonardo DiCaprio on set filming the spy thriller Body of Lies.

"Morocco offers a solution to the Hollywood studios who want to shoot films that are set in the Middle East, but in an environment which would seem to them much safer," says William Higbee, a professor of Film Studies at the University of Exeter, who works with research on transnational Moroccan Cinema.

Over the past 20 years, Morocco has become a popular setting for films such as "Army of One", "Syriana" and director Ridley Scott's spy thriller " Body of Lies ", which tackles topics such as terrorism, says Higbee.

"[There is] a greater interest in Hollywood in relation to films set in Iraq, Afghanistan and the Middle East that are dealing with the politics in America's relationship and intervention into that particular area of the world."



Sensitive topics

Behind "Army of One" is director Larry Charles, who also directed other controversial comedies such as "Borat" and "Brüno", starring Sacha Baron Cohen.

Middle Eastern countries sometimes refuse to accommodate films of a certain political nature, Higbee says. "Body of Lies", which was set in Jordan and starred Leonardo Dicaprio and Russell Crowe is one example.

"They were considering shooting in Jordan or Dubai, but they ended up going to Morocco because of the political content which was seen by those other countries as too sensitive.

"Morocco tends to have a more liberal and open attitude. They didn't have a problem with that kind of narrative."

The Moroccan desert landscape has been a backdrop to hundreds of foreign films.

The military at your service

The Moroccan Film Institute is accommodating and will even help the Hollywood directors negotiate with the Moroccan government and armed forces, says Higbee.

"If they need to ship in any arms or military equipment, there wouldn't be a problem getting that into the country.

"[They may also provide] extras and military equipment or vehicles required for a particular scene."

Clint Eastwood's 2014 film American Sniper, starring Bradley Cooper, was shot in Morocco.

All this schmoozing pays off, and these Hollywood films generate a lot of money for the Moroccan economy, Higbee says.

Cheap labor, generous tax credits and a recently instated 20% cash rebate on the money spent by the production company within Morocco keeps the producers coming back, he adds.

"Scorsese was one of the earliest to go there repeatedly with "The Last Temptation of Christ" which was late eighties and then "Kundun" in 1997."

Vibrant film scene

Alongside the studios that cater to Hollywood, Morocco has a vibrant film industry of its own, making plenty of skilled workers available to the foreign companies, which cut costs by only bringing the key staff from the U.S.

Film is big in Morocco, where even the royals are film aficionados. In 2001, King Mohammed VI created the Marrakech International Film Festival, now an annual event held in December.

"The King is a real cinephile. Since 1999 he has been very vocal in his support of the film industry."

The Atlas Studios in Ouarzazate in southern Morocco.

One country, many faces

Atlas Studios near Ouarzazate is one of Morocco's largest and covers more than 322,000 square feet of desert.

It's not just the Middle East that the Moroccan studios are easily transformed into. From snow-capped mountain tops to deserts, beaches and picturesque cities with narrow streets and vibrant markets with loud tradesmen, spices and snake charmers, there isn't much that can't be filmed here. Cities such as Casablanca, Rabat and Marrakech have several studios attracting productions ranging from feature-length films to documentaries and big budget television dramas.

Season six of the television show "Homeland" is currently being shot in Ouarzazate, according to the Moroccan Film Institute.

Clare Danes on set for Homeland.

The first series of "Prison Break: Sequel", a continuation of the popular American TV show Prison Break is currently under production here too and will be filmed in various locations in Morocco, which this time doubles as Yemen

Television is changing, with Netflix and other on-demand services increasingly focusing on quality drama, their budgets have increased, Higbee says, which means we may see more of this in the future.

A long history of film making

Alfred Hitchcock filming The Man Who Knew Too Much in 1955, a remake of his 1934 spy thriller.

Morocco has a long history of welcoming foreign film crews, especially historical dramas set in ancient Rome or Greece, including "Troy", "Kingdom of Heaven" and "Gladiator", starring Russell Crowe.

Earlier classics shot against the Moroccan backdrop include Alfred Hitchcock's "The Man Who Knew Too Much", Orson Welles' "Othello" in the fifties and "Lawrence of Arabia" in the sixties.

However Hollywood's most famous film set in Morocco, "Casablanca", was shot back home in the US in the forties.

Why didn't director Michael Curtiz choose to film there? With the war still on when it was shot in the early forties, it's likely it was too dangerous.

Or perhaps there were enough sparks flying between Bogart and Bergman that they didn't need to leave the Hollywood studios to recreate the magic of a starry Moroccan night.