As Gulf folk heroes go, Erhama Bin Jaber is surely one of the most enigmatic. Depending on who you believe, he was a 19th-century pirate-cum-corsair, a brave seafaring tribal leader who lived in Kuwait or Qatar, who had his own fort in Oman and owned a small fleet of warships from which he wreaked havoc upon those who crossed him. The British, fearful of losing control of the Gulf, simply called him The Pirate. He must have done something right, however: there's a US$2.6 billion (Dh9.5bn) shipyard named after him at Ras Laffan, Qatar.
But there was a problem for the author Abdul Aziz Al Mahmoud when he embarked upon The Corsair, his debut novel chronicling the time of this legendary figure who is feared throughout the Gulf. Even though the stories of piracy were only 200 years old, there was far too much legend and not enough fact.
"Honestly, I really tried to find out who Bin Jaber was," says Al Mahmoud laughing. "And I did come across some British documents. But it was really tough. The general view we have is from historians in what we now call Saudi Arabia, and he was a friend of the Wahhabi general, so they simply assumed he was a good man - even though they never came across anybody who met, stayed or lived with him."
Bin Jaber's notorious reputation is derived in no small part from the one fact we do know: he spent much of his life - and died - fighting his own cousin. Although, Al Mahmoud maintains that he never actually attacked a British ship and couldn't find evidence of him confronting other tribes. "He must have been clever," he says. "If you think about it, if you're an all-out criminal, you're not going to be a friend of a general or a prince."
Still, Al Mahmoud would be neglecting his responsibilities as a storyteller if he made his protagonist dull and thus, in The Corsair, Bin Jaber has no qualms about throwing his own son overboard when he finds he has betrayed him. There is, too, a quest for a priceless sword - lending the book an enjoyably swashbuckling air.
But Al Mahmoud is most successful in evoking the complicated struggle for control of the trade routes in the early 19th century. Inspired by a British officer's book, The Pirate Coast, that has been translated into Arabic, Al Mahmoud says he wanted to show people that the Gulf wasn't just a quiet, isolated place before the discovery of oil.
"It was a real eye opener," he remembers. "I immediately realised that there were people, war, happiness and sadnesses in this region going back many centuries. But we never really talk about it. Really, we should at least try to understand how people used to live."
It is telling that the writings of a British officer was a starting point because, with the assistance of an impeccable translation into English by Amira Noweira, The Corsair's military history feels strikingly authentic. Al Mahmoud says that studying in the UK and spending some time in the armed forces helped, as did reading about the exploits of the real-life officers - "you could understand their personalities after just a few pages" - but there is an attention to detail here that places The Corsair alongside the likes of Patrick O'Brian's Master and Commander.
"Actually, I wrote it with the full intention that it would be translated into English," he admits. "I do think there is an audience there who are interested in colonialism, how it worked and what its effects were at that time."
It's fair to say the British don't come out of this book with much credit. A consul in Madeira berates an English captain for not studying the enlightened history of the Arab people he calls "backward tribes". Throughout the book, the subtext is that it might be the colonialists who are the pirates, plunderers and criminals, rather than those who simply tried to make a living in their homeland.
"The entire Gulf region was, at that point, under occupation of the British naval force or the East India Company," says Al Mahmoud. "So the book lets you decide whether Bin Jaber is a pirate or a freedom fighter. But in my view, it wasn't as simple as that. People in this region have come across so many conquerors and actually, the only people who engaged in any dialogue were the British."
Not the traditional narrative, perhaps, but then, in The Corsair - as in the Gulf during that complicated time - nothing is simple.
• The Corsair (Bloomsbury Qatar Foundation Publishing) is out now