From Donald Trump to Hungary’s Viktor Orbán to Brazil’s Jair Bolsonaro, nationalism seems to have become the mainstay of political rhetoric everywhere these days. But nowhere has it become more entrenched and, above all, more harmful than in Bosnia and Herzegovina, which held national elections this past Sunday.

Unlike most other places, though, mainstreamed nationalist rhetoric isn’t a recent development here. More than two decades after the war that took an estimated 100,000 lives—and continues to be strongly identified with this Balkan country of about 4 million people—Bosnia is in a position to teach the rest of us a lesson. And it’s a lesson that, ironically, the United States and other Western powers involved in peacekeeping in Bosnia helped lay the foundation for.

The entirety of Bosnia’s Constitution, in fact, is an annex from the 1995 Dayton Agreement, which ended the war. It’s why the country has three rotating presidents from each of the three “constituent peoples”—Bosniaks (Bosnian Muslims), Bosnian Serbs, and Bosnian Croats—to go along with two decentralized subnational entities divided along ethnic lines: the Serb-dominated Republika Srpska, and the Bosniak- and Croat-dominated (and confusingly named) Federation of Bosnia and Herzegovina, which shares a name with the country.

Focused solely on ending the war, the consociationalist power-sharing agreement has given birth to a political reality no state should want. Since it aimed to appease the sides that were at each other’s throats during the war, no one is entirely happy with what they got. This, combined with an entrenched quota system that bureaucratizes ethnic belonging at every level of government, has created an environment in which ethnonationalist parties rule the day, where playing the politics of fear against the “other(s)” is the dominant political tactic.

The best example of what happens when someone tries to push against the nationalist nature of the Bosnian system is the victory of Zeljko Komsic for the tripartite presidency. Self-defining as Croat, he has often claimed that he sees his background as just a formality. His mother was of Serbian descent, his father is a Croat, and he was baptized in a Catholic church. His wife is Bosniak. So while he did run as a Croat candidate, Komsic has over the years had strong support from the Bosniak community in the federation, though this support has not come without criticism of his capabilities as a politician. His popularity has earned him the ire of “proper” Croats, who would only vote for an overtly nationalist candidate like Dragan Covic and his Croatian Democratic Union (HDZ BiH).

“The electoral system allows for Komsic to run and to be elected,” says journalist Dragan Bursac. “It’s a fact that the HDZ [the main Croatian party in Bosnia] are merely local branches of the main party in neighboring Croatia.” Two of Bosnia’s main ethnic groups are the majority in its neighboring countries, and many consider Croatia and Serbia to be their respective motherlands.

This is no more apparent than during the quadrennial elections. The head of the government in Zagreb showed his support for Covic by visiting him during the election campaign. Croatian Prime Minister Andrej Plenkovic was quick to call Komsic’s victory “bad for Bosnia and Herzegovina” because it “didn’t make all three constitutive ethnic groups feel good in the country,” and outlets such as the weekly Globus published menacing front-page articles calling him “Bosnia’s undertaker, someone who will bring an end to the nation.” The worst offender, however, was the Croatian daily Vecernji List, which ran the headline “The Wahhabis Voted for Atheist Komsic to Finally Remove a Croatian Catholic.”

The Vecernji List headline is an example of some of the racist epithets the various ethnic groups use to describe one another. The average nationalist Croat—and nationalist Serb, for that matter—often mocks Bosniaks for being Muslim and culturally influenced by “the East,” branding them as “Wahhabis” or “turned Turk.” Serb nationalists mock Croats for their centuries-old deference to the Vatican or their World War II Nazi puppet state. Bosniak nationalists often generalize both of the other ethnic groups as “killers,” whose goal it is “exterminate” Bosniaks and divide the territorial spoils between themselves. These nationalisms play off of, and reinforce, one another.

The two other presidents to join Komsic in Bosnia’s tripartite presidency are Sefik Dzaferovic and Milorad Dodik. Dzaferovic, a longtime member of the Bosniak-dominated Party of Democratic Action, became the party’s nominee earlier this year to replace outgoing president Bakir Izetbegovic—the son of Bosnia’s first president, Alija Izetbegovic, whom Bosniaks consider to be the “founding father” of their modern Muslim identity. Dodik, meanwhile, of the Alliance of Independent Social Democrats, has morphed into a seemingly unstoppable one-man Serb-nationalist machine. He is now widely seen as the most hate-mongering politician of the post-Yugoslav era, with a propensity for headline-grabbing statements. Aside from Komsic, candidates from parties that tried to appeal across ethnic groups to talk about issues common to all Bosnians—like rampant unemployment, a crippled education system, and corruption—didn’t stand much of a chance against the nationalist juggernauts.

Bosnia’s political system has a way of quickly transforming even the most seemingly cosmopolitan, Western-friendly reformers into nationalist firebrands. Dodik was once the ray of hope in a Republika Srpska dominated by parties that had led the war front in Bosnia and committed countless atrocities (with the most brazen example perhaps being Serb Democratic Party founder Radovan Karadzic, who was convicted of genocide and crimes against humanity). Dodik has since veered further and further into outright nationalism, with the current Dodik bearing no resemblance to the man then–Secretary of State Madeleine Albright called “a breath of fresh air” in 1998. Now the former Western darling won’t shake the hand of the US ambassador to Bosnia—this week even accusing her of pressuring the country’s electoral commission—and he has been placed on a US sanctions list for violating the Dayton Agreement. He might also be the most pro-Kremlin politician in the western Balkans; Dodik publicly supports the Kremlin on a number of issues. “I intend to achieve [Bosnian] recognition of the status of Crimea [as part of Russia],” Dodik said on Tuesday, two days after the elections.

International observers in academia and media often reduce the nationalist mess in Bosnia to so-called “ancient hatreds,” the notoriously controversial phrase used by Robert Kaplan in his 1993 book, Balkan Ghosts. Its roots, rather, are at an air force base outside of Dayton, Ohio. The Dayton Agreement managed to stop the bloodiest conflict in Europe since the Second World War. A bevy of compromises were made to stop the war: All sides conceded in areas they would have preferred not to, and all sides agreed, however grudgingly, on a complicated system meant to stop the fighting and keep it from starting up again.

The Republika Srpska largely corresponds to territory held by Bosnian Serbs at the end of the war, and the Federation of Bosnia and Herzegovina is rooted in the 1994 Washington Agreement, which stopped fighting between Bosniaks and Bosnian Croats. The Dayton Agreement set up a system of ethnic-based power-sharing at almost all levels of government: not only the rotating tripartite presidency, which operates by consensus, but also upper houses at the national and federation level, with memberships and groupings decided by ethnicity, as well as a mechanism called “protection of vital national interests,” which allows politicians to complain if they believe a new draft law might be harmful to their group. And, as mentioned above, an annex of the Dayton Agreement has served as the country’s Constitution.

However byzantine the structure seemed, Dayton achieved its immediate goal: It ended the war and kept Bosnia at peace. Ironically, though, this peace has come at a price. For one, says international human-rights lawyer Gorana Mlinarevic, a system created by powerful men during a war has become, not surprisingly, a system that continues to benefit powerful men and keeps them in charge. “The Constitution comes out of an agreement signed by three men in an army base in the United States to end a war,” says Mlinarevic. “These men carved out Bosnia and set up its Constitution so they could ensure that they would always be in power.”

Above all, it has created a situation, says political scientist Jasmin Mujanovic, in which sectarianism and ethnic identity is the paramount concern of political life. “Power is divided not according to one’s electoral performance but according to one’s presumed or professed ethnic identity,” says Mujanovic.

“Presumed or professed” is the key phrase here. While some in Bosnia will try to convince you otherwise, and insist that they all speak different languages and that their respective nations have very different historical origins, the only notable difference between the three groups is religion. In socialist Yugoslavia, religion was obviously downplayed, so the differences between the three groups weren’t as noticeable. In the post-Dayton era, however, as Bosnians have been pushed further into their sectarian molds, religion has come to play an increasing role in their lives, whether Muslim, Orthodox Christian, or Catholic.

Identity manifests itself in Bosnia in some downright absurd ways. For one, dozens of schools in the federation are still segregated, with students from one group attending different parts of the school or, in some cases, attending the same school but at different times to avoid mixing. The phenomenon is common enough that it has almost become a cliché—“two schools under one roof,” a phrase Bosnians themselves are tired of hearing about from international press.

Amela Pokvic, a recent university graduate in Sarajevo, described her hometown of Gornji Vakuf, roughly equally split between Bosniaks and Bosnian Croats. As a Bosniak, even one living on a street with mostly Bosnian Croat neighbors, she and her Bosniak classmates studied downstairs while her Croat friends studied a different curriculum upstairs. They even studied different languages—Bosnian and Croatian—though many linguists agree that Bosnian, Croatian, and Serbian are mutually intelligible varieties of the same pluricentric south Slavic language. In Yugoslavia, the language was called Serbo-Croatian and taught uniformly across the whole western Balkan region—with insistence on the “differences” only becoming commonplace when they had to correspond to the students of different ethnic identities who were now all taught in different schools. Anti-nationalist activists have built entire campaigns around insisting that everyone speaks the same language and can perfectly understand one another. After all, Pokvic notes, they all spoke the same language with each other once school was out.

Some citizens have come up with creative ways to confront the absurdities of the system. Mlinarevic, the human-rights lawyer, is challenging Bosnia’s government with rulings by the European Court of Human Rights that highlight the discriminatory nature of the system. Two Bosnian citizens, one of Roma and one of Jewish origin, contested the provisions in the Constitution that allow for members of the constituent groups to run for the presidency. The court’s verdict found that the Constitution was indeed in violation of the European Convention on Human Rights—but, nine years later, Bosnia’s government still has not implemented the verdict, and the Constitution remains in violation of the ECHR.

“My opinion is that all elections since those in 2010 are illegal,” says Mlinarevic. “The penal code of Bosnia and Herzegovina considers any failure to respect and implement the verdicts of the European Court to be a criminal offense, and those who fail to do so can receive a jail sentence ranging from six months to five years.” That is why she launched court challenges during the 2014 and 2018 elections. “Around 100 citizens filed this complaint last time. We were ignored. This year we did the same thing, and we don’t expect it to be taken seriously.”

Two subsequent ECHR verdicts confirmed the problematic stipulations of the Constitution. Azra Zornic, a politician who refused to declare affiliation with any particular ethnic group, declaring herself simply a Bosnian citizen, was ineligible to run for the presidency. She sued. Ilijaz Pilav is a Bosniak who lives in the Serb-majority entity, so he was ineligible to run for the presidency seat reserved for a Bosnian Serb.

These constitutional strictures have embedded serious hindrances to citizenship. “If you’re not a Serb, a Croat, or a Bosniak, you are by law prohibited to run for higher offices,” says the journalist Bursac. “However, you’re required to fulfill your civic obligations, such as paying taxes. You have limited citizenship rights unless you declare one of the three nationalities.”

While it’s clear that the system has obvious deficiencies, many would argue that backing out of it could be even worse. “The safeguards ensure that none of the three main ethnic groups—and former combatants—are outvoted,” says Kristof Bender, deputy chairman of the European Stability Initiative, a think tank focusing on southeastern Europe. “This was the price for peace in 1995. It is the price for peace now.” Bender argues that Bosnia’s difficult-to-change Constitution is a feature, not a bug, of its design.

“There is still much to be desired for in Bosnia, but also well-intentioned foreigners should finally recognize that they are not better at resolving Bosnia’s problems than the Bosnians themselves,” he concludes.

When the Dayton Agreement was signed, a group drawn from 50 countries was put in place to oversee its implementation, with an appointed official at the top, forming the Office of the High Representative. The OHR has the authority to fire any elected politician at any level of government—and has done so dozens of times, though not in more than a decade. This reluctance is due to the efforts of the international community to play less of an intrusive role in Bosnia’s internal affairs.

But the kind of nationalism the international community has looked down upon in Bosnia is rising across Europe. With right-wing, quasi-authoritarian, and even far-right-friendly forces wielding increased influence on politics in countries like Germany, Britain, and the United States, politicians from these countries are less interested in getting too involved in conflicts or potential crises beyond their borders—especially if they’re on the same nationalist wavelength as Bosnian politicians. “The international community, itself in the grip of this kind of far-right ideology, will no longer be there to guarantee and protect Bosnia’s sovereignty and territorial integrity,” says political scientist Mujanovic.

As Bosnia prepares to form its government following the elections, it is unclear how the Croats in the country and representatives of HDZ BiH will act, now that they feel slighted and “tricked” out of a candidate in the presidency. For his part, Covic has already warned that Komsic’s victory threatens “an unprecedented crisis in Bosnia”; some observers worry that the HDZ could paralyze the formation of government in the federation and leave the entity with no president, parliament, or even government—and also leave Bosnia’s national parliament without a functioning upper chamber. And if his fellow (if unlikely) nationalist friend Milorad Dodik is willing to support Covic and the HDZ in efforts to paralyze the country, the potential for crisis and chaos in Bosnia will only grow.