They lost 2-0 to France, ending their hopes of becoming the first African nation to reach the World Cup final.
In Europe and in the host nation of Qatar, supporters gathered to support their cause.
It wasn't to be with the goals from Theo and Kylian.
A fan in Casablanca said they were very proud of their team.
France is home to hundreds of thousands of people with Moroccan heritage and there was a large police presence in Paris for the game.
Supporters of other North African countries waved their flags on the Champs Elysées.
Riot police were seen in other European cities, including Brussels, where fans of the Morocco team let off flares and fireworks in celebration of their victory in the World Cup.
The weather seemed to affect fans' post match activities.
The Dutch-Moroccans said they were trying to keep the peace after the match.
At the fan zone in the Mohammed V stadium in Casablanca, one supporter said the semi-final result was ok. Many of the people watching said that the World Cup run was the beginning of a promising future for the team.
Fans at the oldest cafe in Casablanca were becoming frustrated as their team struggled to score.
It was time for Africa to lift the World Cup according to a supporter who was born in France.
The game was being watched by fans in a tent in the grounds of the Casa Arabe. Fans cheered their team on as they were given traditional snacks.
Inas, an English teacher from Rif, is proud of her team despite everything.
The international attention and respect they gave us was a symbolic victory.
Although he was upset when France's second goal went in, Munir was still upbeat and he was chanting with a group of friends.
He said that this is a once in a lifetime event. Our children won't watch this again. Everything has been said about it.
The final whistle blew in the area of north-west London in the UK, and the fans from Morocco gave a big cheer.
Fans were proud of their team's performance. In the cold, the people of Morocco drank tea and smoked shisha.
There were people in Cafe Prego. "We are all one nation", said a fan who believes the World Cup in Qatar has been the best ever.