Herman Melville didn’t know that the West African slaves who inspired him to write his other, half-forgotten masterpiece, Benito Cereno, were Muslim. And when I first learned that they were, I didn’t think it more than a curiosity. I was, after all, planning to use the true incident behind the Melville story to open onto a larger history of freedom and slavery during the Age of Revolution, to which Islam seemed incidental. Ad Policy Greg Grandin’s new book, The Empire of Necessity: Slavery, Freedom, and Deception in the New World, will be published this month.

But the more research I did, the more the importance of Islam revealed itself—and not just to the historical events Melville fictionalized. No one knows how many Muslims were among the 12.5 million Africans brought in chains across the Atlantic. Some scholars estimate as many as 10 percent. For centuries, they served as something like the New World’s secret sharers, its covert operators, a key but largely unacknowledged element in the making of what the historian Edmund Morgan, decades ago, called the defining “paradox” of American history: the paradox of freedom and slavery.

Benito Cereno is a true story. Not true in the way Moby-Dick is true; that book was based as much on King Lear as it was on the actual stoving of the whale ship Essex. In contrast, 1855’s Benito Cereno is taken wholly from an event described in the 1817 memoirs of Amasa Delano, a luckless New England sea captain: one day in late February 1805, while on an unsuccessful seal-hunting expedition in the Pacific waters off the coast of Chile, Delano’s ship, the Perseverance, came upon a Spanish cargo vessel called the Tryal. It was in bad shape, carrying seventy or so West African men and women who, weeks earlier, as they were bound for Lima to be sold, rose up and seized the ship. They slaughtered most of the crew, along with the trader taking them to Peru, and ordered its captain, Benito Cerreño, to return them to Senegal.

Cerreño stalled. He sailed first up and then down the coast, finally running into the Perseverance. The rebels picked up their boarding axes and made ready to fight. But Babo, the leader of the rebels, had an idea. They let Delano come on board and acted as if they were still slaves. Babo’s son Mori, who understood Spanish, pretended to be Cerreño’s devoted servant to keep watch on the two captains. He listened closely as Cerreño told Delano a story about storms, doldrums and fevers to account for the fact that there were no other Spanish officers on the vessel.

Remarkably, the trick worked. For about nine hours, an oblivious Delano—an experienced mariner in the middle of his third voyage around the world and a distant ancestor of Franklin Delano Roosevelt—remained convinced that the West Africans were still enslaved and that he, having provided them with food and water, was their savior.

Melville left no letters or diaries, or at least none yet found, that reveal his thoughts when he read Delano’s memoir, or what moved him to fictionalize his experience on board the rebel-held ship.

But it isn’t difficult to see what attracted him to the story. Aside from its sheer audacity, what is most fascinating about the ruse is the way it exposes a larger falsehood on which the whole ideological edifice of slavery rested: the idea that slaves were loyal and simple-minded, in possession of neither independent lives nor thoughts; or, if they did have an interior self, that it too was subject to their masters’ jurisdiction, that it too was property. What you saw on the outside was what was on the inside. The West Africans used talents their masters said they didn’t have (reason and discipline) to give the lie to the stereotypes of what they were said to be (dim-witted and faithful).

* * *

It is tempting to imagine the drama that played out on the high seas of the South Pacific as part of an epic clash of civilizations, centuries in the making.

Amasa Delano, after all, was a liberal Christian, a new man of the American Revolution. He was born in the coastal Massachusetts community of Duxbury, a hothouse of natural-law republicanism. As a boy, he received his moral education from a series of ever more radical ministers who swept away the Calvinist gloom that had draped New England like a shroud since the early days of Puritan settlement. Like many of his generation, Delano was raised in optimism and taught that certain truths were self-evident: men were both in charge of their destiny and capable of perfection; moral authority was rooted within the individual; and the natural condition of humanity was freedom. Delano believed himself born free, not just free of slavery but of the master-slave relation itself, in all its forms. It wasn’t the mystery of God and subservience to his will that would bring salvation; rather, “pure, unabused reason,” as one especially popular Duxbury minister preached, was the “suitable guide to bliss and glory.”

The West Africans, on the other hand, were mostly Muslim, probably Sufi Muslim (a fact Delano didn’t mention in his memoir, and therefore Melville didn’t know), a religion often portrayed as fatalistic. Its theologians and philosophers tend to define virtue not as individual emancipation but as the psychological and spiritual submission of the self to divine authority. Sufis in particular used slavery as an analogy for nurturing an intimate relation with Allah, of freeing oneself from worldly desire and submitting one’s will and being to God. “Let it be known,” wrote the eleventh-century Sufi theologian Abd al-Karim ibn Hawazin al-Qushayri, “that the real meaning of freedom lies in the perfection of slavery.”

In a way, giving themselves over is what Babo, Mori and the others did.

Over the course of their nearly two-year ordeal, they used the Islamic lunar calendar to give meaning to their misery, to try to calm their fears by relating their sufferings to the unfolding of divine will. Watching the moon, they kept track of their movements around nearly half the world: first out of their homes somewhere in West Africa, across the Atlantic into Montevideo and Buenos Aires, and over the hypnotically flat pampas. They were about to begin a freezing climb up the ice-covered Andes, walking in a single-line coffle, necks chained together, in the shadow of the tallest mountain in the Americas, when Ramadan started. It was an extreme experience that must have collapsed their physical and spiritual worlds into one another, giving them the sense that they were actually approaching the absolute.

Within two weeks, they were in Valparaiso, Chile. They embarked quickly on the Tryal, and the holiest day of Ramadan fell when they were about six days out of port: Laylat al-Qadr—the Night of Power, or the Night of Destiny, when the Angel Gabriel appeared to Muhammad. The event is described in the Koran: “Therein come down the Angels…. Peace!… This until the rise of morn!” The day marks the reconciliation of free will and predestination, reminding the faithful of Allah’s promise to deliver them from history’s sufferings. And on the eve of this day the West Africans chose to seize the ship, execute most of the sailors and their slaver, and demand to be returned home.

Then, to pull off their deception, they had to abandon the outward manifestations of the freedom they had won with their rebellion, a freedom that in any case was proving to be false: it was slipping away with each day they spent in the Pacific short on food and out of water. In order to inhabit their parts and trick Delano, they had to suppress their passions and appetites—literally so, as they were starving and thirsty—and take on the appearance of humble, inconsequential beings. They “perfected slavery.”

* * *

It was, of course, the political scientist Samuel Huntington who popularized the phrase “clash of civilizations” in an eponymous 1993 essay, the influence of which has far outlived its insight. It didn’t take great vision to predict that radical Islam, after having been supported by Washington to counter the Soviet Union, would escape US control once the Cold War was over. Huntington’s real contribution was to provide a pseudo-historical analysis to explain the blowback: “Conflict along the fault line between Western and Islamic civilizations,” he wrote, “has been going on for 1,300 years,” and those “fault lines” will be the “battle lines of the future.”

There are many strains of contemporary Islamophobia. But one common thread insists that Muslims have no true concept of personal freedom. Christianity, the argument goes, contained within itself the seeds of a rational, emancipating individualism, which gave birth to classical political liberalism. Islam, by contrast, is said to be a servile creed: the religion needs a reformation, but reformation is impossible since its insistence on the submission of one’s self to the divine is, at its core, at odds with the pluralism of the modern world. This argument is what creates the affinity between Islamophobia and other branches of the American conservative movement, dominated as they are by a cult of individual supremacy. In fact, one favorite gotcha quote used by the anti-Muslim right is the above-mentioned Sufi aphorism that the “real meaning of freedom lies in the perfection of slavery.” Stripped of its philosophical depth, it’s read as kin to 1984’s Newspeak slogan “Freedom is slavery.” National Review’s Andrew McCarthy, for instance, cites it to explain why the Arab Spring hasn’t resulted in a bloom of liberal democracies.

The belief that Muslims somehow stand outside the West and its traditions has been critiqued elsewhere, including in an essay by Edward Said, “The Clash of Ignorance,” published in 2001 in these pages. Nothing, though, better gives the lie to the idea that a “fault line” separates Islam from modernity than the history of Atlantic slavery.

After the Spanish Conquest, Catholics tried to keep Muslims (and Jews) out of America. “Do not give consent,” read a 1501 royal prohibition against Muslims sailing across the Atlantic, “unless they are black slaves.”

Unless they are black slaves: there lay the problem, for slavery was Islam’s back door into the New World. Between 1501 and 1575 alone, of the more than 123,000 slaves brought to the Americas, over 100,000 were from the area surrounding the Senegal and Gambia rivers, where Islam had taken root centuries earlier. Muslims were present in the earliest slave ships that began to arrive in 1501 and, more than three and a half centuries later, they were on some of the last. They disembarked in the Americas’ northernmost slave ports, in New England, and the southernmost, in Buenos Aires and Montevideo.

Far from quashing individuality, belief in a universal, unseen god and membership in a larger prophetic community gave enslaved men and women a way of surviving—and contesting—slavery.

Muslims were involved in the first major slave revolt in the Americas, which took place on Christmas Day 1521 on a plantation run by Christopher Columbus’s son, and, three centuries later, led the largest urban slave uprising, in Bahia, Brazil, in 1835 (which, like the Tryal rebellion, was launched on the Night of Power).

Among the rebels who rose up and seized the famous Amistad in 1839 were women who wore shawls, men who had been circumcised, and Africans who greeted each other by saying Sallam alaikum, which means that when their attorney, former US President John Quincy Adams, argued for their innocence by invoking the Declaration of Independence’s principles of natural-law liberalism—or, as Adams put it, the “law of Nature and of Nature’s God on which our fathers placed our own national existence”—he was defending Muslims.

* * *

Scratch a phobia and you’re sure to find philia just underneath. Anti-Islamic thought is centuries old, but so is its opposite, especially among late-eighteenth- and nineteenth-century thinkers who were fascinated by Islam, believing that it represented a purer, more honest grappling with dilemmas found in the “West.”

Reporting on the remarkable ruse pulled off by Babo, Mori and their companions on Amasa Delano, the Peruvian viceroy wrote that it was Islam’s “perverse ideas”—namely its effort to find a balance between free will and fatalism under conditions of extreme suffering, along with its insistence on human dignity—that made the religion such a threat to Christian slavers.

In Europe, Johann Wolfgang von Goethe, a founder of German nationalism and one of the most influential philosophers of his era, thought Islam more rational and less self-abnegating than Christianity, believing that faith in Allah represented a higher form of universalism: “We all live and die in Islam,” he wrote. In Great Britain, Thomas Carlyle felt Islam a useful alternative to the materialism, fragmentation and egoism of modern life. It might be a “bastard kind of Christianity,” he said, but it was “a living kind; with a heart life in it.” For his part, Hegel complained that too much “abstraction swayed the minds of the Mahometans,” and then proceeded to reduce all of world history to an abstraction.

Like others of his day, Melville swung easily between caricature and admiration when considering Muslim culture. He might use a turbaned “Moor” to signal opulent despotism, even as he appreciated Islam’s sublimity. Melville toured Turkey, Palestine and Egypt in 1856–57, and was both fascinated and repelled by the mass of humanity he witnessed. In Cairo, the city’s minarets, he wrote in his journal, were “wonderfully venerable” and “gleam like lighthouses.” In Istanbul, scattered among towering cypress trees, they reminded him of the “intermingling of life & death.” One wonders what he would have done with the character of Babo had he known that the real West African, along with many of his co-conspirators, were Muslim. That they were, though, is appropriate, for Melville too thought that the real meaning of freedom was found, as that ancient Sufi mystic put it, in recognizing the limits of freedom.

Melville believed in abolition. “But sin it is, no less,” he wrote of slavery; “…it puts out the sun at noon.” Yet he refused to define freedom as the opposite of bondage. All human beings, Melville thought, oscillate somewhere between the two extreme poles of liberty and slavery that defined much of the political rhetoric of antebellum America. His stories contained characters who were slaves yet made to seem free, and freemen, like Ishmael and Ahab, who were slaves, mostly to their own tangled thoughts and uncontrollable passions.

The point wasn’t, I think, to downplay the horrors of the actual existing institution of chattel slavery by relativizing it to other forms of oppression. Rather, it was to critique a particular definition of freedom that was taking hold in America. Later, on the centenary of the American Revolution, he would describe this truncated freedom as a “vile liberty” with “reverence” for “naught”—not for God, not for nature and not for others. Individualism masquerading as freedom, Melville thought, was no kind of freedom: it blinded people—as it blinded Amasa Delano—to the social world surrounding them.

“All men live enveloped in whale-lines,” he wrote in Moby-Dick. “All are born with halters round their necks.” Whale lines, not fault lines. Melville is a good corrective to today’s Islamophobes, who seek to cleave the world into hostile ideological camps, and a remedy to individual supremacists, who want to deny the ties and obligations that all humans find themselves caught up in—the bonds, in fact, that make them human.

All the tomes of “human jurisprudence,” Melville wrote elsewhere in his whale book, could be reduced in essence to the whaler’s rule distinguishing “Fast-Fish” (harpooned or hooked on a line, and thus in the possession of a given party) from “Loose-Fish” (unclaimed and therefore fair game). “What plays the mischief with this masterly code,” Melville said, “is the admirable brevity of it, which necessitates a vast volume of commentaries to expound it.”

And once expounded, it turns out that there is no such thing as a completely “Fast” or a completely “Loose” fish. “What are the Rights of Man and the Liberties of the World but Loose-Fish?” Melville asked. “And what are you, reader, but a Loose-Fish and a Fast-Fish, too?”