Ryanair is set to launch the service between Edinburgh Airport and the Moroccan city from May this year.
The move is part of a wide ranging expansion plan from Ryanair at the airport. It was also announced this week that a flight will soon run between Edinburgh Airport and Kaunus in Lithuania.
Gordon Dewar, managing director of Edinburgh Airport, said that the new routes highlight that it is "quickly becoming Scotland's airport of choice".
Michael O'Leary, from Ryanair, said that the new routes mean passengers at Edinburgh Airport can now be connected with 38 destinations with the airline. The company has also increased the frequency of its flights on nine routes.
The extra traffic passing through the airport in the summer could mean that hotel rooms and car parking are in high demand. However, booking early will help secure a place and ensure the most reasonable deals.
Figures released from BAA recently show that the poor weather conditions meant passenger traffic was down 7.8 per cent in January at Edinburgh Airport.