John Boyega has been cast in 'The Woman King'.

The 29-year-old actor is to feature alongside Viola Davis and Thuso Mbedu in the historical epic.

Gina Prince-Bythewood, who recently directed the Netflix action movie 'The Old Guard', will helm the TriStar Pictures feature that also has Lashana Lynch in the cast.

The movie is inspired by events that took place in the Kingdom of Dahomey, one of the most powerful states in Africa during the 18th and 19th centuries.

It follows Nanisca (Davis), general of the all-female military unit, and Nawi (Mbedu), an ambitious recruit, who together fought enemies who violated their honour, enslaved their people and threatened to destroy everything they've lived for.

John will play King Ghezo, the ruler of Dahomey and the director was inspired to cast him after he spoke out during the Black Lives Matter protests last year.

Gina said in a statement: "I have been enamoured by John's immense talent for years, but his speech to black women during the protests cemented my desire to work with him.

"The description of King Ghezo reads, 'He walks as if the earth were honoured by its burden.' John possesses that innate depth and swagger, and I'm so excited to put it on screen."

Dana Stevens wrote the original screenplay and is working on the current draft of the script with Gina.

John recently revealed that he was keen to star in a historical drama after watching the hit Netflix series 'Bridgerton'.

The 'Star Wars' actor said: "I think it might not be that show, but I think I definitely have a future in wearing high boots and hats, and speaking more of a pronounced pronunciation. That is definitely in my future."