Tear gas was thrown into the Kosovo parliament Wednesday, but it failed to stop lawmakers from approving a major border agreement that is key to eventual membership in the European Union.

Police arrested several opposition politicians who tossed tear gas several times just before voting was to take place, forcing lawmakers to evacuate the chamber.

Despite the tactic, parliament passed the measure 80 to 11.

The deal was hammered out in 2015. It sets Kosovo’s borders with neighboring Montenegro and fulfills a key requirement for Kosovars to enjoy visa-free travel throughout the European Union. It also moves Kosovo one step closer towards EU membership.

Opponents of the deal say it forces Kosovo to give up some of its territory — a claim supporters deny.

Montenegro has already approved the agreement.