The first time I went to the Berlin Film Festival, the city was existentially cold, cottoned in fog, and grayer than “Wings of Desire.” And I loved it. I had just been laid off and my personal life was mired in one of those brutally unsolicited periods of self-reflection, so a jet-lagged week in the grim heart of Europe was just what the doctor ordered.

That was the year of titles like “Boyhood,” the frigid Chinese neo-noir “Black Coal, Thin Ice,” and an Estonian drama about a film critic who loses his newspaper job — and then his mind — after filing a two-word review of “The Tree of Life.” (“Fuck you.”) I bundled up and walked by the Reichstag, spent a few nights on the east side of town, and tried most of the brews at the House of 100 Beers, a flavorless, three-tiered tourist trap near the center of the festival for attendees too lazy to eat anywhere else.

I was completely isolated on that trip, but it felt like the city had my back. Between its history, its weather, and its movies, Berlin allowed me to feel as depressed as I’d convinced myself that I was. Of course, there’s something about wending through the Memorial to the Murdered Jews of Europe that really helps put your shit in perspective, but the city didn’t just embarrass my miseries; it exposed them to the air they needed to breathe and expire.

“The Other Side of Hope”

This year, I couldn’t think of a better place to spend some time during the first month of our new world order. As ironic as it was that I, the grandson of a Holocaust survivor, was traveling to Germany for peace of mind, I knew that returning to Berlin could help contextualize the storm cloud of confusion that hovered over my home country. And it did, but not in the way I expected.

Last time, the city allowed me to wallow in feeling alone. This time, it seemed as though everyone was in a losing fight against the same frustrations. The festival, and the movies that played there, forced me to recognize that I wasn’t alone at all.

That’s not to say they were very good movies. In fact, it was as underwhelming a lineup as I’ve ever seen at a festival of this caliber. However, they also articulated a sense of solidarity that I hadn’t expected to find in a dark room several thousand miles away from the protests where I wanted to be.

The opening-night film, “Django,” set the tone. The true story of how an evil movement galvanized decent people into doing something good, Etienne Comar’s Django Reinhardt biopic isn’t a particularly great movie, but what it lacked in power it compensated for in perspective. Watching it in one of the Berlinale’s massive screening rooms, surrounded by the planet’s most internationally eclectic group of movie journalists, I couldn’t help but feel as though “Django” transcended its tepid genre trappings and resolved into a declaration of resistance. It was as if the festival threw down the gauntlet: “Okay, a few malignant assholes are dragging the world back down to hell, but what are you going to do about it?”

The most fiercely beloved film to compete in the Berlinale’s prestigious competition section was Aki Kaurismäki’s “The Other Side of Hope,” a poetic title that doubled as an apt description for the festival itself. A wry and winsome modern fable from the cinema’s reigning doyen of deadpan, the auteur’s latest concerns a Syrian refugee who, upon being denied asylum in Finland, escapes deportation and finds work at a restaurant run by a middle-aged malcontent with troubles of his own. Revisiting (and deepening) many of the themes that the filmmaker explored in “Le Havre,” Kaurismäki’s new film warmly affirms that, in his universe, to know one’s place is the greatest happiness of all.

I sat down with Diego Luna just a few minutes after he deliberated Kaurismäki’s film with fellow members of Paul Verhoeven’s jury, and — judging by the vigor with which he discussed the role cinema can play in overcoming borders between people — I was ready to bet money that “The Other Side of Hope” would win this year’s Golden Bear.

Luna and co. would eventually award Kaurismäki the Best Director prize, but the Golden Bear went to another film that also foregrounded notions of boundary-crossing kindness. Far simpler and more sentimental than its academic title might imply, “On Body and Soul” is a lyrical romance about an emotionally inaccessible abattoir supervisor who struggles to find common ground with his slaughterhouse’s beautiful new quality control inspector. (Yes, that old story.)

Hungarian writer-director Ildikó Enyedi adds a pinch of magical realism to this stunted courtship, as it soon becomes clear that these unlikely paramours see each other in their dreams (where they’re deer, natch). A third-act miscommunication threatens a tragic ending, but — spoiler alert — disaster is averted when the movie allows two people to hear each other across the apathetic din of our shared world.

There are any number of reasons why the rom-com as we knew it died out, but “On Body and Soul” — when watched in the wake of “Moonlight,” or in tandem with other Berlinale titles like Luca Guadagnino’s transcendent Sundance holdover “Call Me By Your Name” and Sebastían Lelio’s thrillingly grounded trans drama “A Fantastic Woman” — helped clarify why classic genre obstacles seem insufficient in the 21st century.

It’s not just the chilling effect of technology (Skype alone would dismantle two different Tom Hanks / Meg Ryan joints). Today, the most urgent and relatable modern narratives are about who we are rather than what we do, where we live, or how to lose a guy in 10 days. In a world without borders, we are divided from each other only by ourselves. No other major festival feels so attuned to that awareness, and in no other year has the Berlinale’s globalist streak felt quite so pronounced (a vibe that didn’t do any favors to hermetically sealed misfires like Sally Potter’s “The Party”).

To some extent, this is the way the Berlinale hasto be. Master filmmakers head to Cannes, many emerging ones head to Sundance, experimenters head to Rotterdam. Despite its pronounced sense of prestige, Berlin is left scrounging for selections, hoping to snag a Mia Hansen-Løve or an Andrew Haigh as they make the leap between relative obscurity and certified celebrity. That’s a gross oversimplification, of course, but the Berlinale has to look a little wider and dig a little deeper in order to justify the scale of its roster.

In lieu of a niche, the festival has to make the most of its scope. In that regard, 2017 couldn’t have been better programmed. You could see it in the competition, in which almost no two films came from the same country, and you could see it in the various sub-sections, which were as aggressively diverse as ever. Rafael Kapelinski’s “Butterfly Kisses,” which won the Generation 14plus category, took the fest’s open-minded approach to an admirably uncomfortable extreme, the monochromatic teen drama coercing viewers to identify with an adolescent protagonist whose sexual appetites eventually spill into the abhorrent.

Individually, the movies ranged from “almost great” to “absolutely gruesome,” and far too many drifted towards the latter. Still, the best of the lot channeled a rare sense of empathy, and the lineup reiterated the medium’s power to facilitate conversation between people who might never otherwise have the opportunity to speak. These movies may have been made before Trump — before even Brexit — but they were selected with those catastrophes in mind, and experiencing them together made the very act of watching them feel like a productive first response.

Or, as Diego Luna put it: “Fuck yes! The cinema is needed more than ever!” I think he might be right.