Movie ticket sales surged 50 percent last weekend in North America, compared with the same time a year ago, and you can probably guess why: It was a long, painful week, and not just for the Hillary Clinton fans. The divisions in our country became starkly clear and, despite pleas from both sides of the aisle for the nation to come together, citizens seemed more entrenched and angry than ever.

Luckily, we have movies — the perfect escape.

Except when they’re not. Those looking to take a break from earthly fears might instinctively turn to the big sci-fi and fantasy offerings: “Arrival” is marketed as a movie about an alien invasion, and “Fantastic Beasts and Where to Find Them” seems like a whimsical return to the “Harry Potter” universe. But what viewers will actually find in both films is an incisive commentary on the current state of our country.

Otherworldly movies have a history of getting political, of course. In everything from “District 9” to “E.T.,” we saw humans greet aliens with suspicion, if not full-fledged vitriol, much like some people approach immigrants. “Avatar” was an excuse to critique colonialism and the destruction of natural resources. “Invasion of the Body Snatchers” showed the hazards of totalitarianism.

“Arrival” brought in $24 million last weekend, far exceeding most predictions, but there were probably quite a few people stunned to find out that it’s not really a movie about aliens. (That might explain the relatively low Cinemascore of B from audiences, while the reviews were almost universally glowing.) “Arrival” is actually about the perils of miscommunication and false assumptions. It’s a movie about how precarious a dire situation becomes when we stop talking to each other. Sound familiar?

Directed by Denis Villeneuve (“Prisoners,” “Sicario”), the movie follows a morose linguist, Dr. Louise Banks (Amy Adams), who is recruited by the military to communicate with a couple of aliens that are hovering in a stunning ovoid above Montana.

Banks is terrified at what might happen but dutifully agrees to help. (Warning: Some mild spoilers ahead.) After donning a Hazmat suit, she ascends into the vessel, where she is confronted by a couple of beasts that look like giant walking hands ambling around a foggy enclosure on the other side of a glass wall. They communicate with her using circular symbols that emanate like inky smoke from their starfish-like “hands.”

At one point, Banks takes off her protective gear and explains to her apoplectic handlers that she needs to let the aliens see her. She puts her hand against the glass to say hello. In response, one of the creatures sends its slimy starfish hurtling against the glass with a thwack. It’s startling, and you can understand why any normal human might be afraid of these beings.

And some people are. The spaceship above Montana is just one of a dozen around the globe. At first, each country beset by visitors collaborates. For a shining moment, the world is unified. But pretty soon, communication falters, and China prepares for war. Louise isn’t so sure that’s the right decision.

Unfortunately, China — which, you’ll recall, Donald Trump cast as an enemy throughout his campaign — has shut down the conversation about the visitors, and other nations quickly follow suit. So much for unity.

Without giving away the ending, let’s just say that the beautiful and profoundly emotional movie makes a case for a few things. The first is that foreign visitors do not necessarily mean to do us harm. The second is that we should probably listen to scientists rather than alarmist intuition. The third is that combative nationalism doesn’t exactly make for a more peaceful world.

You’ll find another argument against insularity in the biggest new release this week, “Fantastic Beasts and Where to Find Them.” The movie follows wizards in 1920s New York who exist in the shadows, hiding from normal humans (or “No-Majs”), for fear of persecution.

The wizards, though, are not much better than the humans when it comes to open-mindedness. They see the fantastic beasts of the title as a threat. All manner of lovable monsters could either hurt people or blow a wizard’s cover, the spell-casters reason. The beasts’ ally is the protagonist Newt Scamander (Eddie Redmayne), who collects and studies them.

“We should be protecting them instead of killing them,” Newt explains to the president of the Magical Congress (who, by the way, is a black woman, played by Carmen Ejogo).

J.K. Rowling, who wrote the screenplay for this “Harry Potter” spinoff, is no stranger to politics. Her “Potter” series had plenty of pointed subtext about xenophobia and the dangers of authoritarian regimes. Likewise, “Fantastic Beasts” “grew out of things that are very important to me in the world at the moment,” she told the New York Times.

Things like the Brexit vote, for example, which Rowling vocally opposed.

“Nationalism is on the march across the Western world, feeding upon the terrors it seeks to inflame,” she wrote in an essay on her website, in which she drew a link between the isolationist “leavers” and the supporters of Trump. “Every nationalist will tell you that their nationalism is different, a natural, benign response to their country’s own particular needs and challenges, nothing to do with that nationalism of yore that ended up killing people, yet every academic study of nationalism has revealed the same key features.”

It is not just supernatural movies that are (somewhat unwittingly) echoing our current predicaments. A year ago, after the Supreme Court’s same-sex-marriage ruling, “Loving” might have come across as the hopeful story of the case that laid the groundwork for progress and equal rights. The intimate drama about the couple whose 1967 Supreme Court victory helped overturn the laws against interracial marriage would have seemed to be an example of how far we’ve come. But now, with the uptick in racist rhetoric and hate crimes, the Lovings’ story does not seem so far away. Instead of a history lesson, it’s an urgent reminder that people are people and that love is love.

In another likely Oscar contender, “Moonlight,” the villains are bullies, and they target the movie’s main character, a young black boy discovering his homosexuality, because he is different. Despite the film’s heart-wrenching trajectory as the protagonist realizes the power of love to overcome so much pain, the reality is never far from our minds. Our president-elect shocked many by mocking a disabled reporter on camera much like, well, a bully.

These movies don’t offer escapism — but that might not be what we really need. You can’t walk out of “Arrival” or “Moonlight” without feeling some kind of emotional catharsis. And Newt Scamander of “Fantastic Beasts” is an inspiring and soft-spoken activist who refuses to be intimidated. He vows to protect the imperiled beings that can’t defend themselves. None of that is going to help a viewer forget what is happening in the world, but maybe it can give them something better: an empathetic template for how to move forward.