
A short list of films:
Gladiator - in Oz
Kingdom of Heaven - in Oz
Lawrence of Arabia - in Oz
Black Hawk Down - in Rabat, (it didn't look that rough to me, but I guess I didn't go to where they filmed the movie, thank goodness)
Star Wars - in Tunisia, but it looks like it could have been filmed and inspired here.
Strangely enough, Casablanca, arguably the most famous of all films involving Morocco, was filmed in Hollywood.