Spain has 2 Autonomous Cities in North Africa surrounded by Morocco. Each city is a part of Spain and each has a population of about 74,000. If you can see across a border that has no thickness(it's a line), you can see from one country to the other. Each city has ferry service from European Spain.

Yes, on a clear day the coast of northern Morocco is clearly visible. The closest major city to Morocco is Algeciras and there are regular ferries across to Tangier, Morocco.