Tucked away in the far western corner of present-day Ukraine, the city of Lviv defies expectations. Far smaller than Kiev, it was a closed city during the Soviet period from 1945 to 1991, and even today remains relatively little known. Yet it once was a capital of eastern Galicia and played a crucial part in the borderlands of central Europe for centuries. The current population of 750,000 is overwhelmingly Ukrainian, but in the early twentieth century, it was home to a roughly equal number of Poles, Ukrainians, and Jews who lived alongside each other and to some extent intermixed even as they competed for influence. The often bitter struggles between these groups, combined with the city’s long intellectual and university traditions, meant that the city played a special and largely unrecognized part in shaping our modern international system of human rights. I have been spending time in Lviv, exploring its remarkable but largely unknown legal history.

Polish director Agnieszka Holland’s film In Darkness, which was nominated for an Oscar last year, describes a short moment in this longer story. Drawn from Robert Marshall’s 1991 book The Sewers of Lvov and Krsytyna Chiger’s memoir The Girl in the Green Sweater (2007), the film is about a small group of Jewish residents who take refuge in the sewers of Nazi-occupied Lviv with the assistance of Leopold Socha, a city worker. His nemesis is the sinister Bortnik—he is given no first name—an unpleasant Ukrainian officer who has been enlisted by the Nazis to root out hidden Jews. Holland is a filmmaker of impeccable honesty and the story is simply and powerfully told. But above all it is the film’s setting, below the streets of Lviv, that gives it such force.

Robert Marshall’s book was among the first of dozens I have read to understand what had happened in the city from 1914 to 1945, and in the neighboring areas (not far away is the small Renaissance town of Zolkiew, one of whose few Jewish survivors from that period tells a grimly restrained story of hidden childhood in Clara’s War (2009)) . Though Lviv is today Ukrainian, from 1918 until 1939 it was Polish Lwow, and before that, for more than a century, it was Austro-Hungarian Lemberg. (The sewers that saved Leopold Socha’s Jews originated as a feat of Austro-Hungarian engineering.) Accounts of the city range from the sublime to the ridiculous. And then there is Baedeker’s tourist guide to occupied Poland in 1943: while the good Pole Leopold Socha was providing guidance to hidden Jews below ground, Mr. Baedeker offered his services to visiting German tourists who were sojourning at the Hotel Bristol on the renamed Adolf-Hitler-Platz just a few feet above them. (This is a guide of its times, and the attentive reader will also spot the passing reference to the small town of Auschwitz, for travelers on Reichstrasse No. 391 from Vienna to Cracow, as well as the occasional slip, the reference to the Jews who used to live in a particular location.)

At the end of World War I, control of the city passed from the Austro-Hungarian Empire to a newly independent Polish state—following a three-week interlude in November 1918 during which the short-lived Western Ukrainian People’s Republic state was proclaimed, with Lviv as the capital. As the Poles wrested back control, there was a spate of killings of Jews, mostly by Polish militias. A week later a New York Times headline reported, “1,100 Jews Murdered in Lemberg Pogroms.” The figures were wildly exaggerated, but these and other killings in Poland caused President Woodrow Wilson to insist that the price of Polish independence was a formal commitment to protect minorities. In June 1919 the Versailles Treaty was adopted, including an Article 93 that committed Poland to adopt a further treaty to protect the rights of minorities. Many legal scholars now regard that treaty, drawn up by the drafters of the Versailles Treaty and signed on the same day by an unenthusiastic new Polish government, as a catalyst for modern legal protections for human rights.

Around this time, other treaties formalized the transfer of Lwow into Polish hands, and in the immediate years that followed there were hopes that it would usher in a new era of social harmony. This period is idealized in Jozef Wittlin’s short elegy to the city, Mi Lviv, published in 1941 in Polish after the author had fled the city for New York and the safety of Columbia University (his daughter has recently published an elegant Spanish translation, and someone ought to publish an English version). “I won’t speak of the year 1918,” he writes, but cannot

pass by in silence that moment in those fratricidal Polish-Ukrainian battles which cut not only the city into two hostile parts, when my old gymnasium friend, Zenon Rusin, at that time a Ukrainian khorunzhyi, stopped hostilities in front of the Jesuit Garden so that I could cross the front and get home. There was harmony among my friends, even though many of them belonged to various warring nations and held to different beliefs and views. National Democrats got along with Jews, socialists with conservatives, Old Ruthenians and Russophiles with Ukrainian nationalists. There were no communists at that time, but if there had been they would have certainly gotten on well even with the socialists. Let us play at this idyll.

But if the city’s Jews and other minorities thought the new government would help them, or that Article 93 of the Versailles Treaty could offer real protections, they were mistaken. As early as the summer of 1919, when President Wilson’s envoy, Henry Morgenthau, traveled to Lwow to investigate the November 1918 attacks on the Jews, he found that the head of the Polish government, Marshal Pilsudski, was “most bitter” on the subject of Article 93. “Why not trust to Poland’s honor,” Morgenthau records Pilsudski as saying, “that article creates an authority … outside the laws of this country! Every faction within Poland was agreed on doing justice to the Jew, and yet the Peace Conference, at the insistence of America, insults us by telling us that we must do justice.”

Pilsudski’s tirade went on for ten minutes. The treaty provided no real protections to the Jews: on paper, language, education, and other rights were fully protected, but the reality was that in the absence of proper enforcement mechanisms the treaty was largely honored in the breach. The Ukrainians, for their part, were largely excluded from public life and the numerous institutions of higher education in Lwow, despite their large numbers, a reflection of the manifest inadequacy of the new regime for the protection of minority rights in the face of overt discrimination. Polish control may have provided a degree of stability for the Jews, but it served only to inflame ethnic tensions, a pocket of urban Polish control in a largely Ukrainian land. By the mid-1930s the Polish government had renounced the Minorities Treaty and a darker story began. Long simmering resentments came to the fore as neighboring Germany embraced the Nazis, causing ever more violence.

In September 1939 the Soviets took control of Lwow from Poland, an event that was not particularly welcomed by any of the communities, although the situation for Jews was significantly better than if Lwow had been a few dozen miles to the west and within Nazi control. In June 1941 the Germans launched a surprise attack, and very soon Germany took control of Galicia from the Soviets. The city and the rest of Galicia was integrated into Nazi control, under Hans Frank, the Governor General of occupied Poland.

On August 1, 1942 Frank visited Lemberg and addressed a public gathering. “It is impossible to thank the Fuhrer enough for having entrusted this ancient nest of Jews, this Polish poorhouse, to strong and capable German muscle,” Frank’s son Niklas reports him as telling his audience, in In The Shadow of the Reich (1990), his excoriating account of his father’s inhumanities. Two weeks later, most of the remaining Jews were rounded-up for extermination, as Heinrich Himmler and the governor of Galicia Otto von Wachter met in Lwow. A few weeks after that Socha’s Jews took to the sewers. There is no more devastating first hand account of the period than that provided by Louis Begley in his fictionalized memoir, Wartime Lies (1991), which describes his experiences as a young boy struggling for survival in the city under Nazi control. “Jews found families to hide them so they would not have to go to the ghetto,” Begley writes of the life around him, “and after a week with their saviours they were denounced and shot.”

As In Darkness’s sensitive exploration of group identity and tension suggests, there were no angels in this period, and no single group had a monopoly on terror. Leopold Socha, the man who protects the Jews in the film, was a Pole, but his actions cannot stand for the Polish population in general any more than the actions of the ruthless Nazi Hans Frank, can define every German, or those of the evil Ukrainian officer Bortzik define every Ukrainian. This is the film’s complex lesson: the good Pole saves a few Jewish victims from a bad Ukrainian who is working with ghastly Nazis. The message may or may not be accurate, or capable of being generalized, but it surely explains why the film has been well received in Poland but apparently not yet scheduled for release in Ukraine.

Lviv remains a remarkable city today, although its ability to fully engage with the past is not always apparent. Many of the scholars and writers I have met while teaching at the Law Faculty of Lviv University and also at the new Ukrainian Catholic University over the past two years are eager to engage with the city’s enormously rich history. And while Lvov’s Jewish and Polish roots are now more or less completely extinguished, the signs are there if one looks closely enough, below the surfaces, behind the facades, and etched into doorways.

But recovering that history is not easy. A strident nationalism has emerged across Ukraine in recent years, as the country seeks to define itself in the post-Soviet era, and in the run–up to the European Football Championship in June, which Lviv will co-host with other cities in Poland and Ukraine, the country is once again under scrutiny. German Chancellor Angela Merkel and other European leaders have recently announced that they will not attend the games unless certain human rights abuses are addressed, including the imprisonment of former Prime Minister Yulia Timoshenko.

Lviv probably doesn’t help the situation with establishments such as The Golden Rose, a Jewish theme restaurant that seeks to recreate the life of the inter-war years in a manner that crosses that unhappy line dividing comedy and insult. It is also difficult to avoid signs in the city of continued anti-Semitism or hostility toward minorities: the not so occasional swastika or Star of David daubed on a wall or building. Yet it would be wrong to focus only on the dark side, as civic groups, universities, and NGOs—led by the city’s impressively open Mayor Andriy Sadovyy—seek to build awareness of the past. Next year, for example, Mayor Sadovyy has agreed to co-host an international conference on the city’s contribution to modern international law, and he has sought to call attention to some of the principal actors involved—Jews and Poles—by placing plaques on their former homes. The mayor is right to admonish journalists who chose only to associate the city with aspects of its past.

Lviv invites repeated visits (not least for its coffee, which is as good as any in the world: I particularly recommend Svit Kavy (World of Coffee) at 6 Katedral’na Square), and because it continues to reflect the interplay of differing political perspectives. In a historical sense, homogenous it is not. The issue of group identity and how it is portrayed is always delicate, with political and commercial implications. The formulation of one of the most memorable lines of In Darkness—which comes at the end of the film, and is written not spoken – reflects choices made. Soon after the Soviets removed the Nazis, we learn of the circumstances of Leopold Socha’s accidental death. A blank screen records the following words: “At his funeral, someone said: ‘It’s God’s punishment for helping the Jews.’”

Agnieska Holland takes advantage of her directorial discretion not to refer to the group to which that “someone” belonged. At least one other account, which may or may not be accurate, describes that person as a Pole.