Morocco is located on the northwest coast of Africa and is separated from Spain by the Strait of Gibraltar. The distance between the two countries is approximately 8 miles.