Omar Hamid joined the Pakistani police vowing revenge after a hit man executed his father. Having left the force 12 years later, the Taliban murdered his replacement — the man who had arrested his father’s killer and become his best friend.

The two gritty, electrifying novels Hamid has published since are packed with versions of the underworld characters he met as he rose to become a top counter-terrorism cop in the bowels of one of the world’s roughest cities, Karachi.

The damp alleys and grandiose mansions of Pakistan’s sweltering, ultra-violent megacity are home to 20 million people. Among them move Taliban insurgents buying arms from gangsters, drug traffickers striking heroin deals, kidnappers, hit men and mafia dons.

Hamid served as head of Karachi’s Crime Investigation Department, a unit charged with hunting militants. The main character in his new book, The Spinner’s Tale , is based on Omar Saeed Sheikh, the British-born graduate who beheaded Wall Street Journal reporter Daniel Pearl when Hamid was a new recruit.

Hamid arrested many educated, young, middle-class men seduced by militancy, a phenomenon that terrifies Western policymakers and fascinated Hamid.

“They were men who were very talented and educated, who felt that society hadn’t given them their due. They wanted desperately to be a part of something that was bigger than themselves jihad becomes a canvas they can use to project themselves,” the softly spoken, bespectacled 37-year-old said.

The Spinner’s Tale, published by Pan Macmillan India, was released in the Indian subcontinent in June. Negotiations are underway for a European release.

Fictional friends’ paths diverge

The story follows two friends, united by their schooldays and a passion for a classmate and cricket, whose paths diverge as one immerses himself in Western culture and the other plunges into violence to destroy it.

Hamid says he confronted his own divided loyalties after arresting a young militant recruit. The suspect questioned his integrity and mocked him for chasing justice through a system both knew to be violent and corrupt.

Like his first book, The Prisoner , Hamid’s characters bleed, agonize and brutalize their way through the pages as he brings alive thinly disguised anecdotes from his years on the streets.

“Fiction gives you a lot of license – you can say a lot of hard truths,” Hamid says wryly. That means plots driven by smooth, sinister military officers, self-doubting cops, or hit men hiring themselves out to mafia-like political parties; like the man convicted and hanged this year for killing Hamid’s father. Hunting such men was an obsession when he joined the force, he says.

“One of the best days was when we caught a guy … he was a former police officer who had been involved in the target killings of police officers (involved in political cases). He worked with a hit team … We were after him for something like six months or so, and in that period, police officers kept dying,” Hamid recalled.

Hamid’s background as the son of a senior civil servant, educated at one of the country’s top schools and British universities, made him an unlikely recruit for Pakistan’s embattled and much maligned police force. Like his police protagonists, ordinary men struggling to find their peace within a corrupt system, he sometimes seems like a genteel outsider in a world that can be brutal, as a few gruesome torture scenes reveal. But the education that set him apart also gave him a voice, he said.

“The police is chock-full of amazing stories. The best scriptwriter in Hollywood would not come up with something this good … but its a world (where) we don’t give access to outsiders,” he said.