One recent afternoon, the writer Mohammed Hanif climbed out of his car at the Benazir Bhutto Martyr Park, in Karachi. Hanif, who is fifty, has a square jaw that juts from a square head, and he walks with the easy stride of a fighter pilot, which he once was. He was wearing a pair of knockoff Ray-Bans, which cost about fifty cents at a local stand, and smoking a Dunhill cigarette.

The park—built to honor the former Prime Minister, who was killed by a suicide bomber in 2007—is a kind of urban oasis. Karachi is a sprawling, chaotic city of some twenty-two million people, riven by ethnic strife and gang wars; its main crime-fighting force, the Pakistan Rangers, patrols the streets in pickups mounted with heavy machine guns. Hanif has made his home there since 2008, when he returned from London, where he worked for twelve years as a reporter for the BBC. As a novelist and a journalist, he has become perhaps the foremost observer of Pakistan’s contradictions and absurdities.
At the entrance to the park, a statue of Bhutto faces the street, waving toward the boisterous Karachi traffic. Hanif is writing these days about Bhutto, who is a divisive figure in Pakistan’s modern history and therefore exactly the sort of character that he is drawn to. “For a lot of people, Bhutto symbolized some kind of future that was going to be semi-normal, semi-peaceful, where people could get on with their lives without things always going bang, bang, bang,” Hanif said. But she stole one and a half billion dollars in public money; her husband, Asif Zardari, became known as “Mr. Ten Per Cent” for allegedly keeping a share of every government contract. Her military helped foster the creation of the Taliban, empowering terrorist groups that still plague Pakistan. When the park was finished, in 2010, the Bhutto statue was surrounded by a steel fence, to keep it from being defaced.

Inside the gates, the traffic noise receded; kids played cricket on a broad green lawn. Hanif lit another cigarette. He has a laconic, understated way of speaking, as though he were trying to downplay the outrage and the hilarity that animate his prose. “I used to come here quite a lot, when it was just a lake and some grass. There’d be couples making out, that sort of thing,” he said. “It’s nice that the government was actually able to build this—that the land wasn’t handed over to the usual people.”

In Pakistani cities, valuable land is often seized by powerful gangs or businessmen and cleared for construction. In the distance stood a line of high-rises, at least one of which was rumored to be owned by Zardari, who was President from 2008 until 2013. Within the park, Hanif spotted another illegal building, beside a lake. “Navy guys have built a ‘sailing club’ there,” he said. “You never see a single yacht, but they’ve just grabbed some land to make a private club.”

Hanif says that his novels only happen to be set in Pakistan, and that he has no great desire to explain the place to outsiders. But he acknowledges that the peculiar difficulties and injustices of the society help to give his fiction its manic edge. “I tried once to write a story about another galaxy, and it began to sound like Karachi,” he said. As a journalist, he has written boldly about the military’s repression of domestic dissent and its support of terrorist groups. In a pair of novels, he’s been more slyly devastating, portraying a country run almost entirely by backstabbing mediocrities, and a society where a woman who shows any gumption or intelligence usually ends up dead or disfigured. This kind of critique can be dangerous in Pakistan. While the constitution allows for a broad measure of free expression, people know better than to speak or write publicly about the powerful intelligence services or about crimes committed in the name of Islam. Since 1992, according to the Committee to Protect Journalists, thirty-one Pakistani journalists have been murdered.

Hanif discourages the image of himself as a risk-taking dissident. When a fan at a reading a few years ago asked if he was a target of the security forces, he joked, “Stop giving people ideas.” In private, he is mindful of the connections that allow him latitude: he has a following in the West, and, as a former employee of the BBC, he holds a British passport. Ultimately, though, he hopes that what will protect him is his connection to the country itself. “I was born here,” he said. “I went to a government school in a village. My brother and sister still live here—all my childhood friends are still here. I served in the armed forces,” he went on. “Some writers become foreigners, even when they are living here. I don’t think I am a foreigner. Even the people who don’t like me, I’m one of them. I speak their language. I don’t travel with guards. I didn’t just fly in from England.”

When Hanif was born, Pakistan had been an independent nation for just eighteen years and an Islamic republic for nine. Notionally united by religion, it was divided by almost everything else: class, sect, language, ethnicity. Hanif grew up in a village in Punjab province, the home of the country’s historically dominant ethnic group, the Punjabis. His father was a farmer, like nearly everyone else there, and neither of his parents could read or write; the only book in the house was a copy of the Koran. Hanif borrowed books and read widely, starting in his first language, Punjabi. Then, as a teen-ager, he learned Urdu, the national language, and also English, which gave him access to British and American novels and to Russian and Latin-American works in translation. “English is the language that I associate with fiction,” he said.

Hanif felt stifled by small-town life. When, at sixteen, he found an Air Force recruitment ad in the local newspaper, he saw it as a way out; he signed a contract to serve for eighteen years.“My father couldn’t believe I had actually signed up,” he told me. In most of the world, the Pakistani military is not an esteemed organization; it has lost every war it has ever fought, including one with India, in 1971, in which a third of the Army was taken prisoner. Inside Pakistan, though, it has established itself as the preëminent arbiter of money and power. Until 2013, no elected civilian leader had ever handed power to another; generals always intervened.

In the Air Force, Hanif trained as a fighter pilot, flying an American-made T-37 twin-engine jet. But, he said, “I hated every minute I was there.” Whenever he could, he shirked duty to immerse himself in novels by Graham Greene and Joseph Heller; sometimes he read to his fellow-officers from “Catch-22,” which seemed especially relevant. “This was the life we’d been living, minus the war,” he said.

One afternoon in August, 1988, Hanif was sitting with friends in the officers’ mess, planning the evening. “The only TV channel in Pakistan suspended its normal transmission and started playing recitations of the Koran,” he said. “It was a big sign that something was up.” The recitations were followed by an announcement: a plane carrying Pakistan’s military dictator, General Mohammed Zia-ul-Haq, had exploded in midair. (The explosion also killed many of Zia’s senior advisers and the American Ambassador Arnold Raphel.) Zia had taken power a decade earlier, when he overthrew Prime Minister Zulfikar Ali Bhutto—Benazir’s father—and ordered him hanged. “With the help of the Almighty Allah, the armed forces will do everything we can to insure stability,” Zia vowed. Instead, he presided over a vast, American-funded campaign to drive the forces of the Soviet Union out of Afghanistan. The war, along with the huge quantities of weapons and money that streamed into the country, helped to radicalize Pakistan. On the day his plane blew up, Zia was headed to an Army base after inspecting American tanks that he wanted to buy.

When Hanif and his fellow-officers discovered that Zia had been killed, they celebrated, pooling their money to buy a bottle of illegal whiskey. “I mean, we were really happy,” he said. “Toward the end of Zia’s reign, he was completely losing it. He’d been around forever, and when leaders are around forever they start doing stupid things. Every couple of years, he’d come forth with a new version of the ‘True Islam.’ ” Zia had instituted a sweeping Islamization of Pakistani society, making such offenses as adultery and theft punishable by stoning and amputation. He took thousands of political prisoners, and ordered Bhutto loyalists flogged. “When he got blown up, it was kind of his due,” Hanif said. “It was clear that somebody had bumped him off.”

Three months later, Hanif left the Air Force, a decade ahead of schedule; his father had died, enabling him to leave on compassionate grounds. He became a journalist, writing about fashion, show business, and boxing; he also began to report for Newsline, the country’s most aggressive news magazine. It was an unglamorous life—he lived in run-down Karachi neighborhoods, where his roommates included gangsters and heroin addicts—but he loved the work. One of his early scoops was about student activists in Karachi, who were operating branches of violent gangs at their universities. Hasan Zaidi, a journalist who worked at a rival publication, recalls marvelling at Hanif’s sources: “We would read his stuff and say, ‘Why don’t we have this guy?’ He always had his fingers on the pulse of the street.”
In 1996, Hanif got an offer from the BBC to come to London and work for the Urdu-language service. He was newly married, to Nimra Bucha, an actress, and the job seemed to promise a break from the difficulties of life in Karachi. In an essay written later, he recalled, “People were being kidnapped for a few thousand rupees. Everybody’s cousin had been robbed at gunpoint. Carjacking was rampant. Even an obscure journalist like me had a gangster or two stalking him.” He told Pakistani friends that he’d return after three years. Instead, he stayed for twelve.

He became the head of the Urdu service, supervising a staff of sixty, and the job kept him enmeshed in Pakistani politics. In his sixth year, he got word that one of his reporters had been kidnapped by the I.S.I., the powerful Inter-Services Intelligence agency. Hanif feared that the reporter would be killed, but, on the advice of a contact in the I.S.I., he assigned a series of stories about the abduction. “The guy inside the I.S.I. said that if we wanted him released we should make a lot of noise,” Hanif said. “So we made a lot of noise.”

Before moving to England, Hanif had dabbled in writing plays that criticized the military. One of them was “What Now, Now That We Are Dead?,” written during a period of extrajudicial killings in Karachi. In the play, victims of the killings come back to life to survey the world they departed, then decide that it’s better to return to their tombs.

In London, he became consumed with figuring out who had killed Zia. He made phone calls and researched the lives of those around Zia, trying to assess potential culprits: the C.I.A., the Israelis, the Indians, the Soviets, rivals inside the Army, and even, according to one theory, a case of mangoes that had been carried aboard the plane for a celebration and then had exploded spontaneously. He was met with silence. “No one would talk—not Zia’s wife, not the Ambassador’s wife, no one in the Army,” he said. “I realized, there’s no way in hell I’ll ever find out.”

If he couldn’t solve the mystery, he could address it in a novel, he decided: “What if, fictionally, I raise my hand and say, ‘Look, I did it’?” The idea grew into “A Case of Exploding Mangoes,” a satirical thriller built along the lines of a Pakistani “Catch-22.” Hanif’s narrator and proxy is Ali Shigri, an Air Force trainee who escapes the absurdities of military life by marching obsessively and by smoking high-grade hash, bought from the squadron’s laundryman, Uncle Starchy. Shigri has a good motive to attempt an assassination: his father was murdered on Zia’s orders. But, in Hanif’s telling, nearly everyone in Pakistan wants to kill Zia. His intelligence chief conspires to pump VX gas into the cabin of his plane; a mango farmer plants a bomb, hoping to inspire a Marxist-Maoist revolt. Zia is even pursued by a crow, carrying a curse bestowed by a blind woman whom he condemned to a dungeon.

The historical Zia was humorless and self-regarding, a violent autocrat who liked to be spoken of as a “man of faith” and a “man of truth.” In “Mangoes,” he is a buffoon—paranoid that his underlings are plotting against him, distracted by a long-running fight with his wife, who has kicked him out of their bedroom, and tormented by an itchy infestation of rectal worms. At one point, trying to determine what his subjects think of him, he disguises himself with a shawl and rides into the city on a borrowed bicycle. The disguise works so well that he is detained by a policeman, who mistakes him for a vagrant and gives him a humiliating mandate: “Say ‘General Zia is a one-eyed faggot’ thrice and I’ll let you go.”

If the book’s satire seems cartoonish at times, it is also fearless. The military men are hapless schemers, in thrall to American advisers; the narrator is involved in a gay relationship with another pilot. (“I thought I needed to put some sex in the novel, but it was set in an Air Force barracks,” Hanif said.) Hanif has spoken of fiction as “the opposite of journalism.” But he acknowledges that the book was informed by his years of reporting, and by interviews with survivors of Pakistan’s dungeons. The most sinister figure is an I.S.I. officer, Major Kiyani, whose name evokes that of Ashfaq Parvez Kayani, the Pakistani Army’s notorious chief of staff. To Americans, Kayani is known for presiding over an elaborate double game, in which Pakistan took billions in U.S. aid to help with the war in Afghanistan while covertly sponsoring the Taliban. The fictional Kiyani is both a dandy and a demented torturer, “the kind of man who picks up a phone, makes a long-distance call, and a bomb goes off in a crowded bazaar.” He, too, is involved in a plot to kill Zia.
As Hanif refined the manuscript, he told no one in Pakistan what he was working on. He and Bucha sat up nights in their apartment in London and wondered what the reaction would be. “At one point, I decided I should change the names of the characters,” he said. “But I wrote a few pages like that, and it just wasn’t any fun, so I switched back.” He drew inspiration from Mario Vargas Llosa, the Peruvian writer and politician, whose novel “The Feast of the Goat” tells the story of Rafael Trujillo, the longtime dictator of the Dominican Republic. In the book, Trujillo is depicted as a brute, but also as an impotent bed wetter. “I realized it was O.K. to do this,” Hanif said. “It gave me a kind of permission.”

When he finished the novel, in 2007, he pitched it to a Pakistani publisher he knew. “She wouldn’t even look at it,” he said. His old employer, Newsline, agreed to publish the book, but the printing company that it hired refused to be involved. Finally, Random House in India—Pakistan’s neighbor and archenemy—bought the manuscript and agreed to ship several thousand copies to Pakistan. According to Chiki Sarkar, who was then the head of Random House in India, the potential for controversy was appealing. “I insisted that Zia’s face be on the cover,” she said. “We pitched it as the book that no one in Pakistan would publish.” One early shipment was held up when a customs agent opened a box and saw Zia’s image. Soon afterward, Hanif, along with his wife and son, returned to Karachi to live.

When “Mangoes” was released, Hanif’s Pakistani friends were shocked: after a decade of repressive martial law, he was brazenly mocking the military. “He will just say anything,” Kamila Shamsie, a fellow-novelist, remembers thinking. For many people, though, the satire was welcome. “Hanif is essentially saying, Let’s not see Zia as a big man, as a monster—let’s see him as a pathetic man,” Shamsie told me. “This book feels like revenge.” It got stellar reviews in Pakistan, not least because the country was enduring another military dictatorship: General Pervez Musharraf had seized power in 1999. The critic Husain Nasir described the book as “engaging in rhythm, innovative in style, sardonic in voice, facts oozing out with beguiling charm.” It was long-listed for a Man Booker Prize.

A few times, Hanif had indications that “Mangoes” had reached powerful people. A general approached him at a party and asked who his sources were; others asked how he had managed to unravel the assassination plot. Zia’s son sent a message to complain—but, Hanif said, it was clear that he hadn’t read the book. Remarkably, there was no official backlash. “I think I was helped by the fact that no one in the military reads novels,” he said.

The book’s other great advantage was that it was written in English. The English language occupies a paradoxical place in Pakistani society: it is a holdover from colonial times, which are not favorably remembered, yet it remains the language of government, of the military, and of the upper classes and those who aspire to join them. Nearly half of Pakistanis are illiterate, and many of the rest speak Urdu, or one of the local languages; the audience for journalism and fiction in English is an impassioned but relatively tiny élite. This situation presents both limits and opportunities. Writers in English have far more latitude to criticize authorities, both secular and religious, without retribution. Clerics tend not to read English, or to care much about the opinions of upper-class intellectuals; politicians are largely concerned with the vastly greater numbers of people who read primarily Urdu, Punjabi, Pashto, Sindhi, or Balochi. When Hanif’s English-language reporting has exposed corrupt or mendacious leaders, the official reaction has often been benign. “Sometimes you get this feeling that you are basically writing for like-minded people,” he said.

The success of Hanif’s début elevated him to the first tier of Pakistani writers in English, joining Mohsin Hamid (“How to Get Filthy Rich in Rising Asia”) and Daniyal Mueenuddin (“In Other Rooms, Other Wonders”). But, while much Pakistani fiction centers, like Hamid’s, on the lives of the upper class, or, like Mueenuddin’s, on fading feudal traditions, Hanif focusses on the sordid elements of society, and on the failures of the country’s self-styled guardians. Chiki Sarkar, the publisher, said that Hanif was distinguished by his relatively humble origins. He grew up in a middle-class family, went to a government school, and stayed in Pakistan for college; his work as a journalist has brought him closer to the struggles and disappointments of ordinary Pakistanis. “Hanif writes in English, but his world and his imagination and his humor come from a non-English language,” she said. “He writes in a spirit of delinquency.”
Hanif lives in Defence, a neighborhood of stately homes on the Arabian Sea. It’s one of the nicest parts of Karachi, filled with the kind of people who might buy Hanif’s books, but its affluence is deceptive. Many of the homes are barricaded by sandbags and cement walls and protected by armed guards; the residence of the current Home Minister of Sindh province, a few houses down from Hanif’s, resembles a fortress. Generators counter the city’s chronic electricity shortage. Defence may be a neighborhood of oligarchs, but, as one Pakistani writer told me, in Karachi you can live like an oligarch on a hundred thousand dollars a year.

Hanif lives in a comfortable two-story house, which, like most of the others, is surrounded by walls. But he does not employ an army of servants, and, inside, the place is homey and unostentatious. When you walk through the gate, you are greeted by Hanif’s two pet dogs, a conspicuously Western touch; in a Muslim country, dogs are generally seen as supersized vermin.

Hanif does what he can to stay in touch with the “pulse of the street.” He regularly returns to his home village to see old friends. He often writes in Urdu—plays and song lyrics as well as journalism—and he appears on Urdu-language television. The effect of his work in Urdu is more pronounced, he says; more people call him to comment on his pieces, and his criticisms of the government or the military carry more punch. But his most transgressive writing doesn’t always reach the largest audience. Eight years after its publication, “Mangoes” has yet to be published in Urdu. When he and Bucha, who acts in Urdu-language films and soap operas, appear together in public, she is recognized more often than he is.

For years, as Hanif read the Pakistani newspapers, it seemed that every day there was at least one story about an attack on a woman: shot by her brother, or stoned to death by a mob, or sentenced to death after her husband’s family accused her of insulting the Prophet. When I arrived in Karachi, the story was about a woman who had been set on fire by relatives.

In 2008, Hanif began to imagine a story about a female avenger fighting back against Pakistan’s patriarchal society. “I just had this idea of a female superhero flying around and kicking ass,” he said. He was also inspired by his boss atNewsline, an editor named Razia Bhatti, who pushed him to go after powerful public officials. “The stories back then were printed on these long rolls of paper, and she used to sit with me and go through my stories line by line. She was a real crusader—absolutely fearless.”

After a few tries, Hanif found himself uncomfortable with the superhero conceit—“I was afraid I was writing a bad Hong Kong type of movie”—and he gave it up. Then another scenario occurred to him. Years before, his mother had fallen ill and was taken to the hospital. He sat with her for days, in a ward staffed around the clock by female nurses, most of them Christians, a tiny minority in Pakistan. “So many institutions in Pakistan don’t work at all, and I was struck by how dedicated the nurses were,” he said. “Their salaries are very low. No one was supervising them—it was the middle of the night—and yet they carried on in the most dedicated way.”

Hanif got the idea of writing about a nurse in a decrepit hospital. Alice Bhatti (named for his old editor) is a ferociously strong young woman: smart, independent, and rebellious to the point of recklessness. She works as a nurse in the Sacred Heart Hospital for All Ailments, a shambling Catholic institution in Karachi that is corrupt, underfunded, and horrifyingly filthy: rats make nests of human hair; gunnysacks filled with body parts sit in a corner. Alice is Christian, the daughter of a faith healer, from a Christian slum called the French Colony, where Jesus is known as “Lord Yassoo.” She comes from a family of “sweepers,” or janitors, a job performed overwhelmingly by Christians. At the hospital, Alice sees the most vicious tendencies of Karachi—murders and molestations that go unreported, bodies that go unclaimed. She freely mocks the Islamic faith, in concert with her father, who warns her, “These Muslas will make you clean their shit and then complain that you stink.” More than anything, Alice is determined to defend herself from an endless wave of insults and assaults:

There was not a single day—not a single day—when she didn’t see a woman shot or hacked, strangled or suffocated, poisoned or burnt, hanged or buried alive. Suspicious husband, brother protecting his honour, father protecting his honour, son protecting his honour, jilted lover avenging his honour, feuding farmers settling their water disputes, moneylenders collecting their interest: most of life’s arguments, it seemed, got settled by doing various things to a woman’s body.

When a wealthy patient’s relative tries to force Alice to perform oral sex, she slashes his genitals with a razor and dispatches him to the emergency room. “Go to Accidents. And no need to be shy, they get lots of this sort of thing during their night shift,” she says. “And stop screaming.”

In another city, Alice might have called the police. Instead, her primary contact with law enforcement is Teddy Butt, a bodybuilder who works nights on a police death squad. Butt—a simpleton with a steroid abuser’s high-pitched voice—becomes infatuated with Alice, and professes his love while holding her at gunpoint. When she rebuffs him, he leaves the hospital and, in despair, fires his pistol into the air. The bullet wings a truck driver, who slams on his brakes, which causes a rickshaw to swerve, which kills five schoolchildren crossing a street, which sets off a riot that spreads across Karachi, as thousands of aggrieved citizens sack restaurants, burn tires, and overturn cars. The mayhem lasts for three days; eleven people die and entire neighborhoods are destroyed before things settle down. “Newspapers start predicting ‘Normalcy limping back to the city,’ ” Hanif writes, “as if normalcy had gone for a picnic and sprained an ankle.”

“Our Lady of Alice Bhatti” is a funny book, more light-footed than its subject matter suggests, but its power lies in its portrayal of how Alice is relentlessly crushed. Finally, Alice agrees to marry Teddy—largely to move into a roomier apartment—but he is bewildered by her high-spiritedness and sets about trying to make her behave like a proper wife. When she tries to leave him, he feels “dishonored” and seeks a time-honored remedy: he throws acid in her face. Alice may have been a superhero, Hanif suggests, but in Pakistan not even female superheroes can prevail.

The Karachi Press club is situated in a mansion built during colonial rule, with high wooden shutters to keep out the heat and palm trees on either side. Reporters sit at tables on the grounds, smoking and chatting. Every afternoon, people with grievances against the government gather to demonstrate, sometimes by the thousands. It’s a curious ritual—the demonstrators coming to the reporters, rather than the other way around. “It works this way because the reporters are too lazy to go out,” Hanif, who visits the club occasionally, told me.

The Pakistani press corps works with a strange mixture of privilege and constraint. Pick up one of the better English-language newspapers—the Newsor the Dawn—and you will find penetrating coverage of national security, poverty, and governmental corruption. But, beyond shifting and mysterious boundaries, no journalist may stray without risk. In 2010, Umar Cheema, who had written about dissent within the military, was picked up by men in police uniforms who were widely presumed to be I.S.I. agents. They shaved his head, sexually humiliated him, and dropped him miles from his home, with a warning to stop. The following year, Saleem Shahzad published stories asserting that the armed forces had been infiltrated by Al Qaeda. He was beaten to death and his body dumped in a canal.

The infiltration of the armed forces by Islamist militants has long been a dangerous topic; the country’s blasphemy laws are another. In the past few years, there has been a third: the bloody insurgency in the state of Balochistan, where the military and the intelligence agencies have been accused of a campaign of kidnappings, torture, and executions. According to the Committee to Protect Journalists, thirteen reporters covering Balochistan have been murdered since 1992. In 2014, Hamid Mir, the country’s best-known television journalist, who has criticized the Army and the I.S.I. in his pieces, was shot six times by unknown gunmen as he drove to work. Since then, Mir says, his television station has stopped reporting aggressively on Balochistan.

In 2012, Hanif was asked by the Human Rights Commission of Pakistan to write a series about dissidents who had disappeared in Balochistan. Hanif’s reporting was compiled in a small book, “The Baloch Who Is Not Missing & Others Who Are,” and also published in English-language newspapers. After the stories came out, Hanif received a call from an old Air Force friend who had become a general. “I heard some people talking badly about you,” the friend said. “Why do you put yourself at risk?” Hanif interpreted the call as a calculated warning: “He was passing me a message.”

There were other signs that even the English-speaking élites were no longer safe. In January, 2011, the governor of Punjab, Salman Taseer, was shot dead by his bodyguard after he denounced the death sentence of an impoverished Christian woman, who was charged with insulting the Prophet after a group of Muslim women refused to drink from a bowl that she had touched. “That was a seismic shift,” Kamila Shamsie, the novelist, said.

Last April, Sabeen Mahmud, a close friend of Hanif’s who ran a local event space called the Second Floor, was planning a panel discussion involving Baloch leaders. Worried that the I.S.I. would react badly, she turned to Hanif for advice. He told her that it would be very risky, but Mahmud decided to go ahead anyway.

Hanif was out of town the night of the discussion, but he followed it on Twitter, and was relieved when it came to an end without incident. A few minutes later, he got a call from a friend: gunmen had pulled alongside Mahmud’s car and opened fire, killing her and wounding her mother. “It really shook me,” he said. “I used to think, like Sabeen, that we were really small fry. Who the hell cares about a hundred and twenty people sitting in a room talking, a bunch of like-minded losers?” Mahmud’s death was a measure of how much things had changed in Pakistan. The stories Hanif had published about Balochistan were “impossible now,” he said.

The police announced that they had arrested a suspect in the killing, but nothing about him fit the profile of an assassin: he was a student at one of the most prestigious universities in Pakistan. Many of Mahmud’s friends suspected that she was killed by the I.S.I. In September, her driver, who witnessed the killing, was also shot dead. After Mahmud was killed, a large group of supporters gathered at the Karachi Press Club, planning a series of protests to demand the truth about what had happened to her. Hanif joined them. “I am not a protester by nature, but it seemed like the decent thing to do,” he said. There was a good crowd, he said, nearly two hundred people. But it rapidly petered out. On the twentieth day, Hanif told me, only three people came.

Hanif’s audience seems not to have lost its appetite for outrage, or at least for comic relief. During a discussion at the Karachi Literature Festival, a woman in the audience stood and asked him to write another coruscating novel, like his first one. “ ‘A Case of Exploding Mangoes’ was so close to the truth,” she said. “My copy is in tatters now, because ten of my friends borrowed it.”

Hanif’s most rambunctious new work is “The Dictator’s Wife,” a musical that he wrote with the composer Mohammed Fairouz, which will have its première at the Kennedy Center in January. The main characters are unnamed—known only as the First Lady and her husband, Himself—but they bear an unmistakable resemblance to Pervez Musharraf and his wife, Sebha. The dictator in question never appears onstage. As his wife scrabbles with angry protesters and gripes about her compromised marriage, he is sequestered in the bathroom, represented only by a mordant song that his aide-de-camp sings on his behalf:

When you’re forced to bugger

200 million people

You need time to recover.

After you have rigged the elections

After all your positive actions

You need a few moments of self–reflection

Me time.

This kind of antic effect has grown scarcer in Hanif’s writing, which has become increasingly tragic. Last year, Fairouz asked him to collaborate on an opera about Benazir Bhutto. Hanif had considered writing a book about her, but decided that her life—filled with death, corruption, and betrayal—was too dramatic. “It’s too over the top,” Hanif told me. But opera seemed like a fitting medium. “In opera, everyone gets killed, and everything is over the top anyway,” he said.

Hanif knew Bhutto glancingly; while he was living in England, she was also there, having fled arrest warrants in Pakistan after the collapse of her scandal-ridden government. On occasion, she came into the BBC office to talk about the news from home.

In 2007, Bhutto was granted amnesty, and that October she returned to Pakistan to run for a third term. Less than an hour after she arrived, a suicide bomber attacked her motorcade, killing more than a hundred and forty people. “No one thought something like that could happen again,” Hanif said. “Once she survived it, she’d be safe.” Two months later, she was attacked again, by a suicide bomber and men firing weapons. This time, she was killed.

The Pittsburgh Opera plans to stage “Bhutto” in 2018. As Hanif revises the libretto, he and Fairouz sift through ideas in long telephone calls. The libretto has moments of Hanif’s anarchic humor: one of the main characters is a cabinet minister named Maulana Whiskey (essentially, Whiskey Priest), and Benazir is called by her childhood nickname, Pinkie. But most of the story seems haunted by thirty years of political and social tumult. It consists of three acts, each centering on a momentous death: Zia’s hanging of Benazir’s father, the explosion of Zia’s plane, and Benazir’s assassination.

“Bhutto” will no doubt cause a stir in Pakistan, whether or not it is staged there. A large part of the population holds the memory of Benazir’s family sacred, and the question of who killed her is unresolved. Musharraf, who was President at the time, is now on trial for the murder in Islamabad. He has maintained that, when an intelligence report suggested Bhutto might be attacked, he did everything he could to protect her. But Bhutto’s lobbyist in the United States, Mark Siegel, testified that Musharraf denied a request from Bhutto for more security, telling her, “Your security is dependent on the relationship between us.”

Bhutto’s legacy also lingers in more urgent ways. The Taliban, which flourished during her Administration, is surging in Afghanistan, and its affiliates are at war with the Pakistani state. In a recent Op-Ed piece in the Times, Hanif recounted a series of attacks in Pakistan, including a raid on a school that killed a hundred and forty children. Afterward, the Army claimed the attacks were evidence that “hard targets,” such as airports and military bases, had become too difficult to strike. “The language used to report and commemorate these massacres is sickeningly celebratory and familiar,” Hanif wrote. “The students are called martyrs. Their courage is applauded.” He went on, “How much courage does it require to take a bullet in the head? . . . This is imposed martyrdom, and it isn’t a sign of strength. It’s a sign of utter helplessness.”

For the first time in years, Hanif has begun to wonder about his future in Pakistan. Bucha, his wife, has asked him to stop appearing on television, out of concern for his safety. “It’s something I think about all the time,” she told me. “In Pakistan, you don’t have to be outspoken to be killed. The people we might be afraid of are people we don’t even know.” She and Hanif talk about whether the family should leave the country again. In the meantime, he sometimes encourages rumors that he’s living abroad.

When Hanif worked at the BBC, he used to go to the office each day hoping that Pakistan would not make the news. It seldom happened that way. For a writer engaged with politics, there has been a benefit. Politically turbulent societies often produce extraordinary literature: Russia in the twilight of the tsars, India after independence, postwar Latin America. Pakistan, reliably chaotic since 1947, has served Hanif as a wellspring of characters and ideas. Still, he insists that he would be happier if the country somehow became calm. “I never want to leave,” he said. “If Pakistan were normal and boring, I would love that. I’d shut my mouth for a while, if that was the price.”

This story is written by The writer Mohammed Hanif probes for truth in Pakistan.