Considering the turmoil of the present moment, there could be no better time to read best-selling, Hugo Award-winning writer N.K. Jemisin’s sprawling and provocative new novel, “The City We Became,” in which New York City and its denizens battle an alien force intent upon eradicating them.

Readers familiar with Jemisin’s work may recognize the novel’s prologue, originally published in a slightly different form as “The City Born Great” by Tor.com in 2016 and later included in Jemisin’s 2018 story collection “How Long ’Til Black Future Month?” In it, an unnamed young, black graffiti artist is mentored by a man named Paulo, the avatar of the Brazilian city of São Paolo. Paulo has arrived downtown to act as cosmic midwife to New York City, which has reached a sort of celestial critical mass and is ready to be embodied by the bemused younger man.

But before New York City can transition to this next stage, the fabric of our world is torn. Through the rift, an Enemy enters, known as the Woman in White, an avatar from a dimension other than our own. In her wake, white fractal beings with too many eyes and legs pursue the boy and destroy the Williamsburg Bridge. The primary avatar of New York City escapes but falls into a dream-state and disappears.

As the graffiti artist learned, “great cities are like any other living things, being born and maturing and wearying and dying in their turn.” Jemisin’s fictional world may not be threatened by a virus, but with rampant gentrification and the rise of global oligarchies and white nationalists propagating endemic racism, sexism, homophobia and transphobia, among other horrors, cities like New York have become battlegrounds for the diverse array of individuals and communities who have long lived and often thrived there.

Fortunately, Paulo knows what to do: To save the city from the Enemy, he must awaken and engage the individual avatars of the five boroughs so they may in turn awaken the primary. And before you can quote from Walt Whitman’s great poem “Mannahatta” (which could serve as a template for Jemisin’s paean), “The City We Became” ramps into high gear, and we meet the other avatars.

Manny — Manhattan — is an expensively dressed man who can’t remember his past or why he’s just arrived in Penn Station. All he knows is that he has a history of violence and an intense connection to the sleeping avatar, whom he has seen in visions and feels bound to protect.

Thirty years earlier, Brooklyn Thomason was the groundbreaking rapper MC Free; today she’s a Birkin-toting city council member with a JD and a teenage daughter. Bronx-born Bronca Siwanoy is an arts administrator and Lenape Indian descended from her borough’s first residents. Padmini Prakash, the Math Queen of Queens, is a young immigrant who first encounters the Enemy when it tries to devour two children in her backyard swimming pool. All four are people of color.

Which leaves . . . Staten Island, the forgotten borough, whose unlikely avatar is Aislyn Houlihan, daughter of a racist, misogynistic, homophobic Irish Catholic cop. Aislyn seems to have never left Staten Island. Her own racism and xenophobia are so deeply embedded that she recoils in horror when a black person accidentally brushes against her. This makes her easy pickings for the white-skinned Woman in White, whom Aislyn quickly regards as a mentor, and who convinces her (not that Aislyn needs much encouragement) that the other avatars — brown-skinned, other, queer — are the true enemy.

Yet unless all five boroughs can unite to find and awaken the sleeping primary avatar, the “hybrid vigor” of our own beautifully chaotic city will be forgotten, supplanted by the Enemy’s redoubtable monolith. “We don’t know the names of some of the cities that have died this way,” Bronca explains, “but the ones we do know will tell you what we’re up against: Pompeii. Tenochtitlán. Atlantis.”

Like Victor LaValle’s brilliant 2016 novella “The Ballad of Black Tom,” “The City We Became” subverts the work of the repellent H.P. Lovecraft, in whose stories evil is embodied as swarthy and foreign. If Jemisin’s novel lacks some of the deep strangeness of LaValle’s tale, it makes up for it in sheer moxie and sly humor. Manny, avatar of the borough epitomized by unchecked capitalism, weaponizes credit cards, Checker Cabs and an iconic cinematic image. Brooklyn defends herself by channeling a Grandmaster Flash song. The Enemy’s various disguises include an unseen, nosy woman in a bathroom stall and Dr. White of the blandly named, sinister Better New York Foundation.

And while all five avatars wield powers derived from the strengths of their individual boroughs, even superheroes struggle to prevail against gentrification, aggrieved white cisgender men who attempt to promote their alt-right agenda through really bad art, and a tendency to squabble among themselves. As Mrs. Yu, neighbor of the Math Queen of Queens, observes during one such quarrel, in China there are “lots of avatars — probably hundreds . . . [They] make sure the world works as it should . . . It’s duty. It’s normal. Get over it.”

“The City We Became” ends on a high note, but it makes no concession that the fight for a more equitable world is over. In both fiction and reality, it’s barely started.

Elizabeth Hand’s 16th novel, “The Book of Lamps and Banners,” will be published later this year.

THE CITY WE BECAME

By N.K. Jemisin

Orbit. 448 pp. $28