An election in Kosovo designed to help end years of de facto ethnic partition was marred by violence and intimidation by Serb hard-liners on Sunday, undermining a fragile pact between the Balkan country and former master Serbia that was brokered by the European Union.

Two hours before polls closed in the ethnically divided town of Mitrovica, a volatile Serb pocket of northern Kosovo, masked men burst into three schools on the Serb side used as polling places, lobbing tear gas and smashing ballot boxes.

Participation of the northern region’s Serbs in the Kosovo-wide council and mayoral elections is central to an agreement reached in April to integrate those 40,000-50,000 Serbs with the rest of the country, which is majority Albanian and declared independence from Serbia in 2008.

Serbia’s government for the first time had called on Serbs in northern Kosovo to take part in the vote, with the European Union holding out the prospect of membership talks — slated to begin in January — as a reward for Belgrade’s support for the process.

But on the mainly Serb side of Mitrovica, a former mining town split along ethnic lines since Kosovo’s 1998-99 war, turnout was just 7 percent at 3 p.m., compared with 32 percent across the country.

The low turnout and violence were clear indications of the scale of resistance among northern Kosovo’s Serbs to integration with the rest of the country and underlined the challenge facing the E.U. in implementing the April accord.

Voting in north Mitrovica was halted after the attack, which occurred about 5 p.m.

As election officials fled, E.U. police in armored vehicles spread out in the neighborhood and helicopters flew over the town.

The Organization for Security and Cooperation in Europe, which is helping manage the election, pulled out 60 of the more than 200 staff members from the area.

“The election will not resume tonight or tomorrow, and the question is whether it will resume at all,” said Oliver Ivanovic, a candidate for mayor of north Mitrovica. He said a woman was injured when she jumped out of a window.

Those who had voted were jeered and abused by groups of Serbs, many of whom had traveled from Serbia, gathered outside polling stations and filming those who entered.

“These elections are an act of high treason that will ultimately cut Kosovo off from Serbia and lead to a Serb exodus from Kosovo,” said Negovan Todorovic, a 22-year-old student. “Belgrade is betraying Kosovo for the vague prospect of . . . so-called European integration.”

— Reuters