It is possible to travel to Morocco by train from most European countries. Trains through France and Spain are excellent and there are ferries crossing from Algeciras and Tarifa (in southern Spain) to the northern ports of Tangier and Sebta (in northern Morocco). From Tangier or Sebta it is around 7 hours drive by road or you can take a train to Marrakech.