PODGORICA, Montenegro (AP) — A Montenegrin court early Saturday released from detention three pro-Serb opposition lawmakers who were jailed following turmoil in parliament over the vote on a contested church property law.

Trying to prevent the bill’s approval, the three hurled what appeared to be a tear gas canister or a firecracker and tried to destroy microphones in the Parliament hall on Friday. The bill was nonetheless passed.

The Serbian Orthodox Church in Montenegro says the new law allows the state to take away its properties. The government has denied it wants to do so.

Opponents organized all-day protests on Thursday and blocked roads, fueling tensions in Montenegro.

Police detained 22 people, including 17 lawmakers, suspected of taking part in the parliamentary unrest. All but three were released shortly after their arrest early Friday.

The legislation says religious communities with properties need to produce evidence of ownership from before 1918, when Montenegro joined a Serb-led Balkan kingdom and lost its independence.

Montenegro split again from Serbia in 2006 but its 620,000 people remain divided over whether the country should pursue closer ties with its neighbor. About 30% of Montenegro’s population identify as Serbs and mostly opposed the split from Serbia.