Director Jordan Peele’s “Get Out” is both a psychological thriller and a commentary on racism. (Rich Fury/Invision/AP)

Like any good horror film, Jordan’s Peele’s “Get Out” benefits from good timing.

It’s something Peele understands well as one-half of the comedy duo Key and Peele. “Get Out,” which he also wrote, is part psychological thriller, part satire — and the film balances hair-raising moments with sharp humor.

But “Get Out,” which follows a young black man preparing to meet his white girlfriend’s parents for the first time, does more than just thrill: It makes racism viscerally terrifying. And in another instance of apt timing, Peele’s directorial debut lands amid the Black Lives Matter movement and on the heels of a contentious presidential election that exposed the country’s deepening racial divisions.

“Do they know I’m black?” Chris (Daniel Kaluuya) asks his girlfriend as he packs for their trip to see her parents. It won’t be a problem, Rose (Allison Williams) assures him, adding that her dad would have voted for Barack Obama a third time if he could have.

Chris quickly realizes that something is off with the few black people he encounters at the family’s sprawling estate in Upstate New York, including the maid, Georgina (Betty Gabriel), and groundskeeper, Walter (Marcus Henderson).

There’s a twist coming, and it’s a doozy. But “Get Out,” which hits theaters Friday, is scary even before it’s scary. As Chris warily interacts with Rose’s parents (her dad has the sudden inclination to use such phrases as “my man!”) and their inner circle, the story conveys what it means to constantly be on alert in certain settings and company. In other words, what it means to be black in America.

Peele got the idea for “Get Out” during a more optimistic point in U.S. history — as Obama was campaigning to be the nation’s 44th president. His historic presidency led to what Peele refers to as the country’s “post-racial lie.”

“There was a sentiment that we had a black president now, so racism is over,” Peele told The Washington Post. “It even felt like President Obama couldn’t talk about race in a way that was satisfying.”

Peele and Keegan-Michael Key memorably addressed this challenge with a “Key & Peele” sketch that found Peele portraying the nation’s even-tempered first black president and Key assuming the role of his passionately unrestrained “anger translator,” Luther, who was prone to tantrums and blunt rebukes of the president’s critics. Key performed the bit alongside the real Obama at the 2015 White House Correspondents’ Association dinner.

“Get Out” was inspired by the same frustrations, Peele said, “of knowing racism is still very much alive in this country, but that it was sort of being neglected as an issue.”

That was more than eight years ago. Now, Peele thinks people will be even more receptive to the film’s message.

“As the last couple of years unfolded and the country got woke to a certain extent, the movie became less about identifying the fact that racism exists and much more about giving us a hero,” he said.

Allison Williams and Daniel Kaluyya in ”Get Out.” (Justin Lubin/Universal Pictures)

Black men don’t typically fare well in horror films. They tend to be supporting characters, and as the somewhat debunked cliche goes, they’re usually the first to die. In telling the story from the perspective of a black protagonist, “Get Out” subverts its own genre.

“Even more so, I feel like our perspective and what we want from a horror movie is rarely represented,” Peele said. “And I think what we want in a horror movie is somebody not to do some stupid s---, but instead to do the smart thing that any rational person would do once they figure out this heightened situation.”

Peele loves horror movies, which makes sense when you consider the twisted conclusions of many “Key & Peele” sketches. Few horror films have tackled race — George Romero’s 1968 cult classic “Night of the Living Dead” is probably the most famous example. Peele said he took cues from two of his favorite films — “The Stepford Wives” and “Rosemary’s Baby.” Where those films analyzed gender issues (to varying degrees) through the horror lens, Peele sought to do the same with race.

The other obvious reference in “Get Out” is the 1967 film “Guess Who’s Coming to Dinner,” which starred Sidney Poitier and Katharine Houghton as an interracial couple whose relationship shocks their respective families.

“Guess Who’s Coming to Dinner” was controversial upon its release 50 years ago, coinciding with the Supreme Court’s landmark decision on interracial marriage in Loving v. Virginia. It remains a historically important film, but it renders a rather sanitized statement on race relations by 2017 standards.

“Get Out,” like “Guess Who’s Coming to Dinner,” takes aim at well-to-do white liberals. As Rose’s parents, Catherine Keener and Bradley Whitford (an alum of “The West Wing,” to boot) are the picture of East Coast liberal elites. That — and the film’s New York setting — place “Get Out” outside the traditional Hollywood racism narrative, said Susan Courtney, a film and media studies professor at the University of South Carolina.

“Historically, Hollywood put the social scene of racial horror in the South,” said Courtney, noting that films across genres — “To Kill a Mockingbird,” for example — have tended to scapegoat “poor, white Southerners” as arbiters of racial hatred.

Peele: “I like to stir the pot. I like to get in trouble. I have a wicked desire to watch people squirm for my work.” (Justin Lubin/AP)

Peele said he deliberately avoided setting “Get Out” in red state territory.

“It was really important for me to not have the villains in this film reflect the typical red state type who is usually categorized as being racist. It felt like that was too easy,” he said. “I wanted this film to explore the false sense of security one can have with the, sort of, New York liberal type.”

Peele is biracial — his mother is white — and the experience of navigating both worlds has had a palpable influence on his comedy. It’s also in the nuanced commentary of “Get Out,” which acknowledges that racism is an institution, not merely a personal character flaw shared by the film’s villains.

Chris and Rose’s meet-the-parents story provides a relatable entry point for audience members of various backgrounds, but Peele, who is married to the comedian and actress Chelsea Peretti, said there is no deeper commentary to mine about interracial dating.

“Nothing was really intended there,” he said. “I like to stir the pot. I like to get in trouble. I have a wicked desire to watch people squirm for my work.”

“Get Out” offers plenty of opportunities to squirm. But Peele said he also hopes the film induces some genuine scares — and laughs.

“And then hopefully it’s a reference point as we forge into the difficult conversation about race,” he said.