BERLIN — Red Arrow Entertainment and the U.K.’s Channel 4 are teaming up with BAFTA-winning writer Adrian Hodges on a TV series based on Giles Milton’s historical novel “White Gold.”

The story is an account of the Barbary Corsair pirates and the white slave trade in North Africa throughout the 17th and 18th centuries, which saw more than one million people enslaved after being captured in pirate raids across England, mainland Europe and even as far as North America.

The book, published in 2005, revolves around the true story of Thomas Pellow, a young Cornish merchant seized at sea by Barbary Corsairs and sold to the sultan of Morocco, where he spent 23 years as a slave before managing to escape.

Hodges, who penned “My Week With Marilyn” and co-created ITV’s “Primeval,” will write the two-hour pilot and bible for the proposed 12-part series.

Simon Maxwell, Red Arrow’s head of drama and comedy, will serve as exec producer on the project, while Sophie Gardiner, Channel 4’s commissioning editor for drama, will lead development.

Red Arrow and producer Piers Tempest optioned the rights to the book in 2011, and brought Hodges onboard before pitching the project to Channel 4.

“Our focus at Red Arrow is to identify the boldest stories, with international relevance, and match them with world-class writing talent,” said Maxwell. “‘White Gold’ blows the lid off a forgotten yet revelatory chapter from our past and, given the sheer scale and ambition of the project, we’re delighted to have Adrian Hodges at the helm to bring this story to life. It’s a story as thought provoking as it is gripping and its perfect home is Channel 4.”

Hodges added, “It’s about slavery and survival, the clash of wildly different cultures and above all the unquenchable desire for freedom. It’s very rare to come across a story that features such a panoramic account of a remarkable event in our collective past that also features such an amazing collection of vivid characters and incidents.”

Channel 4’s rights unit 4Rights is funding development of the project and has a first option to pick up all U.K. secondary and ancillary rights if the script is ordered to series.

The deal follows 4Rights’ recent investment in the U.S. remake of French drama series “Pigalle,” which is being adapted by James Manos Jr. (“Dexter”) and Helion Pictures.