You can travel from London to Tangier via Paris and Madrid in less than 48 hours, with a night in Algeciras (Spain).
Morocco is no longer part of the InterRail/Eurail systems, so you will have to buy tickets locally to add the country onto a European trip.
In Algeciras, the train station is about 10 minutes’ walk from the ferry terminals for Morocco. If you arrive during the day, you should be able to quickly transfer to the ferries.
A useful resource is the website Man in Seat 61 (www.seat61.com), which has comprehensive, regularly updated information on getting to Morocco by train.
European hire companies do not usually permit their vehicles to be driven to Morocco.
If you intend to take a Moroccan hire car to the Spanish enclaves of Ceuta or Melilla, you must have a letter from the hire company authorising you to take the car out of Morocco. Some hire companies will not allow you to take their car out of the country.
Algeria This border remains closed. Algeria is reluctant to reopen it until the status of the Western Sahara is resolved – don't hold your breath.
Mauritania Most Western governments advise against travel to Mauritania.
Spain You can cross to mainland Spain via the Spanish enclaves of Ceuta and Melilla in northern Morocco.
Buses mostly enter Morocco on the ferries from Spain, with connections from across Europe. Routes are busiest during major Spanish or French holidays, as buses fill up with Moroccans working abroad.
CTM (www.ctm.ma) Compagnie de Transports au Maroc, Morocco’s national line, operates buses from Casablanca and other Moroccan cities to Spain, France, Belgium, Germany and Italy.
Eurolines (www.eurolines.com) A consortium of European coach companies operating across Europe and into Morocco (partnering with CTM).
Supratours (www.oncf.ma) Run by train company ONCF, has weekly departures from the major northern Moroccan cities to destinations across Spain, France and Italy.