Yes. They even have land-borders.
The Atlas mountains in Morocco are close to Spain.
Morocco
Morocco, Spain, and France.
Morocco is south of Spain in Africa.
The Strait of Gibraltar separates Spain from Morocco.
Morocco was split between France and Spain.
Spain and Morocco
Morocco
Jordan, Morocco and Spain.
No African country borders Spain. Morocco is separated by sea at the Straits of Gibraltar from Spain, so it is close to it.
Morocco, Spain, and France.
The straight of Gibraltar separates Spain from Africa meaning its SPAIN