Omar Shahid Hamid is a Pakistani policeman turned fiction writer. His debut novel “The Prisoner” is a gripping crime thriller about an American journalist who gets kidnapped in Karachi and the investigation undertaken by the city’s police as they attempt to rescue him.

“What I find particularly interesting about the police in a country like Pakistan is that where institutions are weak, individuals matter more,” Hamid tells Weekend Review. “So actually your scope for doing good or bad can be tremendous. And I think that was one thing that has always appealed to me about the police, that the change that you can potentially do, you can actually visibly see it.”

I met Hamid for the interview in his office in London where he has been on sabbatical from police work in Karachi. Some may find it curious that with his many years of experience policing Pakistan’s largest city, Hamid chose to tell his story as a fictional account. Perhaps one advantage is the liberty to explore sensitive issues. “I think in fiction you can say a lot of things that are very truthful without people getting upset. And I think it is just easier to tell a story in fiction. Frankly as a fiction writer you tend to reach a much wider audience than if you write a niche sort of nonfiction book.”

Some of the characters and events depicted in the novel overlap in places with real life. For instance some readers will draw similarities between the American journalist in the book and the real life Wall Street Journal reporter Daniel Pearl, infamously kidnapped and brutally killed by extremists in Karachi in 2002.

Then there is the character of Akbar Khan, an imprisoned police officer on whom the book’s title is based. He was actually inspired by a well-known senior officer in the Karachi police force, Chaudhary Aslam, a close friend and colleague of Hamid. Aslam was killed earlier this year after a car carrying explosives crashed into the vehicle in which he was travelling in Karachi. The Taliban claimed responsibility for the attack on the man dubbed “Pakistan’s toughest cop.” Aslam’s killing received coverage from media around the world as someone who had taken a hardline stance against the Taliban.

“Our friendship goes back to even before I joined the police,” says Hamid. “Because Aslam was the officer who actually arrested the sort of militant who was responsible for the killing of my father.” Hamid’s father, who was chief of the local power company, had been murdered in a targeted killing during the late 1990s. “At that time I was not in service, I was just in university, and Aslam at that time was head of a police station.”

After Hamid came into the force they became friends. “For a long time Aslam had been suspended and he was out of favour, the political exigencies had changed. Ultimately you know around 2004 we started working together and we ended up doing a number of high-profile postings. We were in Lyari [one of Karachi’s most dangerous neighbourhoods] together. We were together when we apprehended a guy who was at that time the don of the Karachi underworld called Shoaib Khan.”

Like the imprisoned character of Khan in Hamid’s novel, in 2006 Aslam was arrested. “I was not in the country at the time, but even I was implicated in the same case,” says Hamid. “And in fact Aslam, and other members of our team, had to spend about a year and a half in jail, but subsequently all of us were acquitted. We were shot together in Hub at one point in a police encounter, both of us were wounded. So if you have that sort of relationship you become very close.”

The two had worked together for many years. “Out of my 12 or 13 years in the police I have probably worked with Aslam for at least 7 or 8 of them. So we were very close. It was a sort of daily relationship where you meet and work together on a daily basis.”

It is not just some of the characters who are realistically portrayed. The reader finds the fictional police force in “The Prisoner” facing a lot of pressure over the American journalist’s kidnapping. I ask Hamid if there was a similar pressure on the officers when the real life Pearl was kidnapped. “Absolutely” he says. “I remember talking to one of the lead investigators at the time — President Musharraf who was then in power — was literally asking for an update on the case on a daily basis. It was the first major incident that had happened right after the American invasion of Afghanistan — a big high-profile US journalist being kidnapped like that. So the pressure at the time on those officers was just intense, no doubt.”

Hamid himself was not directly involved in the investigation over the Pearl kidnapping. “I had literally just joined,” he says. “We were still in fact in the police academy at the time. I was not involved in the investigation into the case. Subsequently when I joined the police, especially when I came to the CID [Crime Investigation Department], because a number of the officers in the CID had investigated that case, those officers then became my subordinates or my colleagues and so I have talked to them about the case very often. We have chatted about it very frequently.”

In terms of feedback to his book what Hamid found particularly surprising is people he assumed were very knowledgeable about Karachi telling him how they never knew such things happen. “They say yes the police are corrupt, or yes there is political interference in the police. But very few people actually understand the mechanics of that. So I think those were the sort of things that people found surprising.” And the reaction from other police officers? “The reaction has been quite good in the sense that I keep joking that most of the police officers don’t have that much time to read the book. But I think the ones that have read it have been very appreciative.”

Some of the real life incidents Hamid has experienced as an officer are equally, if not more dangerous, than his fiction. “Our offices were blown up in 2010,” he says. “We had just moved to another building a week or so before that. But we still had some staff there. There were 20 people who were killed in the bombing and I think over a 100 were injured. Those were really the kind of things that bring home to you the dangers of the job.” However, the targeted killing of police officers in Karachi is nothing unusual. “All of us who have worked in CID Karachi have faced a very high level of threat,” says Hamid. “Our officers have been attacked multiple times.”

The killing of his colleague Aslam was one of the more high profile examples. On the day when Aslam was killed, 9 January 2014, only a few weeks had passed since the release of Hamid’s book in Pakistan. He remembers he had been getting ready to go to a book event. Suddenly his driver and one of his guards gave him the news that there had been an attack on Aslam. The news was on television.

“I tried to call him,” says Hamid. “His phone was ringing but no one was picking up. I then started going towards the scene of where the incident had happened. I think somewhere on the route I was finally able to get through to Shahid Hyat who was the Karachi Police Chief. He then confirmed to me that Aslam had been killed.”

Hamid tells me Aslam knew about “The Prisoner” and how he had influenced his writing. “I had joked with him that I had written a book about him and that he should go and buy a 1,000 copies or something of it,” says Hamid. “And in fact a few days before he was killed he said he had bought a copy of it and that he had not read it yet but would get someone to translate it. So he knew I had written a book in which there was a character based on him.”

Later at Aslam’s funeral Hamid recalls meeting a lawyer who had been a friend of both of them. “I had not obviously expected Aslam to read the book because Aslam was not proficient in English in that sense,” says Hamid. “But he was telling me that one day when he had gone to Aslam’s office he saw the book lying there. Aslam picked it up and said ‘Omar sahib has written this book about me.’

“The lawyer friend of ours asked for the copy to see what was written. Aslam actually gave it to the lawyer and asked him to tell him what was written. So the lawyer read perhaps one or two chapters and said this is what the book is talking about. So he was quite happy and then when the lawyer asked if he could borrow the copy, Aslam said ‘no, go buy your own, this is my copy.’”

Hamid has just finished his second book “It looks at the issue of radicalisation and extremism and how in many ways it is similar to some elements within the Daniel Pearl case, how you can go from what we would perceive a very normal background, and how the process of becoming radicalised moves and how that affects individuals lives.” Any resemblance to Mohsin Hamid’s “The Reluctant Fundamentalist”? “I think there are some similarities to ‘The Reluctant Fundamentalist’, but I think probably that book had a different message.”

When does he plan to return to policing in Karachi? “I suspect it will probably be sometime in the near future, I haven’t really worked out exactly when.”

Syed Hamad Ali is a writer based in London.