It's been a whirlwind three-day visit, in which the Duke and Duchess of Sussex met local schoolchildren, petted horses and enjoyed several traditional ceremonies.
And the British royals' final engagement during their official visit to Morocco was an audience with the North African nation's monarch, King Mohammed VI.
Before departing the country to return to the United Kingdom, Prince Harry and pregnant Meghan, Duchess of Sussex, visited the royal's private residence in the capital of Rabat.
For the occasion, Meghan, who is expecting the couple's first child in April, chose a bespoke Carolina Herrera gown, with ruffled sleeves and a vibrant yet ornate print, while Prince Harry donned a grey suit.
The British royals were joined by Morocco's Crown Prince Moulay Hassan, 15, as well as the king's sisters, Princess Lalla Hasna and Princess Lalla Meryem, for the engagement.
The duke and duchess used the occasion to present King Mohammed with letters from Queen Elizabeth II, Kensington Palace revealed.
Earlier in the day, the couple visited Rabat's Royal Equestrian Club, where they stroked horses in the stables, and got to know more about how equine therapy helps children and young people with disabilities and mental health challenges.
Prince Harry and Meghan also stopped by Villa Des Ambassadeurs, where they took part in a cooking activity with children from disadvantaged backgrounds, and a social entrepreneurs' market at the walled Andalusian Gardens.
Their three-day visit was designed to shine a spotlight on youth empowerment and the education of girls and young women in Morocco, and is believed to be the couple's last overseas engagement before the birth of their first child.