Bathed in afternoon sunlight on the steps of the Palais des Festivals, Mati Diop screamed out with arms aloft, joy writ large on her face.

Red carpet galas at the Cannes Film Festival are not usually like this. More common is the sight of a director smiling through the nerves, appeasing the cameras while preparing for critics’ slings and arrows. Raw emotion is for when the credits roll, coddled by applause inside the Grand Theatre Lumiere.

But no such reticence from Diop; she was already celebrating.Two days later Diop was still buoyant. “What I felt that day, I had never felt it before,” she said. “It was so unique and special.”

Mati Diop flashes a victory sign as she arrives with Senegalese actress Mama Sane for the gala screening of “Atlantics” at the 72nd Cannes Film Festival. Credit: CHRISTOPHE SIMON/AFP/AFP/Getty Images

Diop’s film “Atlantics” is a rare thing: a director’s debut feature in competition for the Palme d’Or. Its selection also meant French-Senegalese Diop became the first black woman in the running for one of the highest prizes in world cinema.

Part romance, part ghost story, “Atlantics” is a magical-realist take on the migrant crisis, following a community in Dakar, Senegal, after a group of exploited construction workers, owed months of pay, set sail for a better life in Europe. Rather than focus on the migrants, Diop turns her attention to the trauma of those left behind: the women haunted by the young men’s absence.

Diop is quick to make clear the experiences on screen do not reflect her own, but it’s a deeply personal project nonetheless, and one with a degree of self-discovery.

Mati Diop and Alex Descas in “35 Shots of Rum” (2008). The film by Claire Denis was the actor-turned-director’s breakthough. Credit: Wild Bunch/IMDB

Born in Paris into a family of distinguished Senegalese artists, Diop’s father Wasis is an acclaimed jazz-folk musician, while her uncle Djibril Diop Mambety was a pioneer of African cinema whose 1973 Cannes-winner “Touki Bouki” also addressed the subject of migration.

Until now best known as an actress, Diop has directed short films since 2004, including “Snow Canon” (2011), an exploration of a young woman’s sexual awakening, and 2012’s “Big in Vietnam,” revolved around the search for an actor missing from set.

Her 2009 short “Atlantiques,” about a young man in Dakar mulling an attempt to sail to Europe on a small pirogue boat, would become the foundation stone of her first feature.

A still from “Touki Bouki” (1972), directed by Djibril Diop Mambety, Mati Diop’s uncle. Credit: Courtesy of Teemour Diop Mambety/The Film Foundation

“As soon as I decided I was going to become a filmmaker, it was immediately connected to my African origins, as if I wanted my cinema to be rooted there,” she said. “I think I needed to use cinema to explore this territory.”

Diop compared the filmmaking process — particularly editing — to psychoanalysis: “A lot of things appear to you that were a bit unconscious.”

Ada, played by first-time actress Mama Sane. Credit: Les Films du Bal/Cinekap/FraKas/Arte France Cinéma/Canal Plus internation

When “Atlantiques” took shape 10 years ago, mass migration “was very big, something tragic in Senegal,” Diop explained. “At the time (it) really marked the population a lot — myself included. I was coming from France to make a return to my origins and I would meet people (going the other way) … I was not chosen, but taken by a history that was much, much bigger than mine.”

The film found poetry in describing a generation’s predicament. “What is Europe?” a character ponders, a destination transfigured into an idea. When you have “nothing but dust in your pockets,” as one voice puts it, dreams become nourishment.

Diop described her “Atlantics” as the sequel to “Atlantiques,” exploring “the other side of this story.” We bear witness through the eyes of Ada, whose beau Souleiman takes to the sea, leaving her to face an arranged marriage to the wealthy but uncaring Omar.

On their wedding night, an unexplained fire consumes the bridal bed, with Ada’s friend swearing she saw Souleiman nearby.

A police investigation ensues, and Ada is accused to harboring her missing lover, but the detective in charge becomes one of many seized by a mysterious illness when night falls.

Ada (Mama Sane) and Soulieman (Traore) in Mati Diop’s “Atlantics.” Credit: Les Films du Bal/Cinekap/FraKas/Arte France Cinéma/Canal Plus internation

Diop, who co-wrote the script with Olivier Demangel, said she imagined “the ocean as an accomplice … a supernatural force which was gobbling up the youth.” Only in her film, it spits them back out to wreak havoc on the community.

“Atlantics'” hypnotic visual storytelling carries the viewer from young love’s first blush into something slightly sinister, navigating “djinn” spirits and the witching hour before arriving at an achingly sincere denouement.

Like the films of Claire Denis — to whom Diop’s directorial style bears comparison– there’s ellipses everywhere, faces and bodies left to do the talking.

However, Denis, who directed Diop in her breakthrough role in 2008’s “35 Shots of Rum,” insists that Diop “has her own territory and spirit.”

“I knew she was very determined,” Denis wrote in an email, “but when I saw ‘A Thousand Suns’ (Diop’s 2013 documentary following up on the cast of “Touki Bouki”), I became convinced she was brave, not only talented.”

“(Diop) really is one of the most subtle people I’ve ever worked with,” said musician Fatima Al Qadiri, who composed the film’s score. “The details are so fine and minute, and she will take you there with her. There’s something very fragile but also extremely strong. There’s paradoxes in her work that I was very drawn to.”

“Atlantics” themes — first love, precarious employment, arranged marriages and migration — may be universal, but the film is a staunchly Senegalese parable. The dialogue is nearly entirely in Wolof rather than French (though Diop doesn’t speak it herself).

Casting took place on the streets of Dakar. Writing in close consultation with trusted friends, she said fidelity was key, stressing the importance that “Senegalese people — some Senegalese people — recognize themselves in the story.”

“It’s extremely important that more and more stories concerning African history, of characters, are (made),” she added. “It’s really a matter of re-appropriating your own stories.”

Speaking at a press conference the day after the gala she went further. “(Growing up watching cinema) as a black woman, I really missed black figures and black characters … It’s also why I made this film. I needed to see black people on screen, like huge, everywhere.

“Al Qadiri revealed that in September the film will premiere back in Dakar, bringing the project full circle. “It means everything,” said Diop. “I’m very curious to have feedback from the people there.”

In “Atlantics,” Ada muses that “some memories are omens.” For Diop and her young cast, that sunny afternoon on the French Riviera should be considered one.