IN AMERICAN GODS, Neil Gaiman envisions a world in which the barrier between the human world and the divine is permeable—in which gods are shaped by human desires, and mythical creatures walk among us. Author G. Willow Wilson plays a similar game with Alif the Unseen, dabbling not with the pantheon of Western gods, but Muslim culture and mythology.

The titular Alif is a young hacker living in an unnamed country in the Middle East, in a city that "boasted one of the most sophisticated digital policing systems in the world, but no proper mail service." Alif—his chosen handle refers to the first letter of the Arabic alphabet—sells digital protection to clients who want to operate outside the government's strict restrictions on cyber speech, shielding them from the ever-prying eyes of the state. But "Alif was not an ideologue; as far as he was concerned, anyone who could pay for his protection was entitled to it." He's not a hero; he's just a kid who found a way to make some cash by fucking with the system.

But Alif's much-guarded anonymity vanishes abruptly one day, when his computer is hacked and his systems destroyed by a mysterious character named "The Hand," soon revealed to be a high-level government agent. Throw in a couple of genies and a mysterious and slightly smelly book called The Thousand and One Days, and you've got a book that smartly weaves together age-old mythology with real-world technology. Alif and a few requisite sidekicks scramble between supernatural realms and bureaucratic ones, dodging government agents as they fight to solve the mystery of the stinky old book.

In her author's note, Wilson says that she began writing Alif two years ago in part due to frustration at the mainstream media's insistence that blogging and social media were politically inconsequential—a short-sighted position that would be permanently and irrevocably invalidated by the events of the Arab Spring. Wilson finished Alif, she writes, "just as Mubarek left office, Tunisia was under new management, and uprisings had begun in Libya and Syria." The book thrums with that prescient energy, but its political relevance is matched by audacious ambitions and page-turning plot twists.