Prizegiving was followed by a screening of “Elizabeth: The Golden Age.”

The festival runs through December 15 and is screening 15 films in competition from as many countries. For the closing ceremony, the jury will award four more prizes — for film, actor, actress and a jury prize.

Scorsese, who shot “The Last Temptation of Christ” and “Kundun” in Morocco, is considered an old friend of the festival. He paused to dole out encouragement to young, local filmmakers: “Nothing should stop you. Even if they take the camera away, you can do it. There are no excuses.”

In addition to honoring DiCaprio, he is officially on hand to promote the work of the World Cinema Foundation, which was announced at the Cannes Film Festival in May. The non-profit organization, which Scorsese founded, is dedicated to the preservation and restoration of film heritage around the world. One of the first films to be restored was Ahmed al-Maanouni’s “Trances,” a 1981 documentary about the music of the Moroccan group Nass al-Ghiwane.

The foundation hosted a special screening of “Trances” at Jemaa al-Fna, Marrakech’s raucous public square, on Sunday night. Organized with one of the film’s producer, Izza Genini, the screening followed a mesmerizing, jam-packed concert by Nass al-Ghiwane, who reformed in the 1990s and whose lyrics the crowd sang along to reverently from memory.

After the concert, Scorsese took to the stage to introduce the film and offer the gathered masses a shy “shukran” (Arabic for “Thank you.”)

Scorsese recalled seeing the film for the first time in the middle of the night while editing “The King of Comedy.” A television station in New York played “Trances” over and over until morning.

Scorsese loved it, and said it was his introduction to the people and culture of Morocco. It also tied in with his interest in performance films, from “Woodstock” and “The Last Waltz” to his forthcoming project on the Rolling Stones.

“Performance is a primal communication, more than literature or any visual media,” Scorsese said.