Mahershala Ali is to star in 'Leave The World Behind'.

The 47-year-old actor has boarded the cast of the Netflix thriller and will feature alongside Julia Roberts.

The 'Mr. Robot' creator Sam Esmail will direct the flick, which is an adaptation of Rumaan Alam's novel of the same name.

It was first revealed last year that Netflix had acquired the rights to the project and Denzel Washington was in talks to star opposite Julia – although that role will now be filled by Mahershala, a winner of two Academy Awards.

The movie will be produced by Julia through her Red Om Films banner as well as Esmail and Chad Hamilton via Esmail Corp. Alam will executive produce while Lisa Gillan and Marisa Yeres Gill are also involved in a producing capacity.

'Leave The World Behind' is a story about two families, strangers to each other, who are forced together on a long weekend that has gone horribly wrong. The story explores themes of parenthood, race and class as well as how our closest bonds are reshaped.

Mahershala is also starring in the drama film 'Swan Song', which will be released on Apple TV+ in December alongside Naomie Harris, Awkwafina and Glenn Close.

The picture has been described as a genre-bending drama set in the near future that explores how far someone will go, and how much they'll sacrifice, to make a happier life for the people they love.

The project has been written and directed by Benjamin Cleary and is being produced by Adam Shulman, Jacob Perlin and Jonathan King. Ali is also serving as a producer through his Know Wonder banner.