A church service that has been performed continuously for 96 days has come to an end after the Dutch government agreed to pardon a family the pastors were shielding from deportation as part of a wider amnesty.

Sasun Tamrazyan, his wife Anousche and their children Hayarpi, 21, Warduhi, 19, and Seyran, 15, have been holed up in the Bethel church in The Hague since October, relying on a medieval law that says immigration authorities cannot enter while a religious service is being performed.

The family, who have been in the Netherland for nine years, had claimed their lives would be in danger if they returned to Armenia, where Sasun had been a political activist.

But this week the Dutch coalition government announced under pressure from campaigners that they would examine the cases of 700 children and their families who are under the threat of deportation. Residency rights were likely to be granted in 630 of the cases, government officials said.

Derk Stegeman, a pastor at the Bethel church, said the Tamrazyan family had been reassured that they would be included among those allowed to stay in the country.

Hayarpi Tamrazyan, an econometrics student at Tilburg University, said on leaving the church with her parents and siblings that it was “unreal, it is a relief” to “finally go outside again, walk around”.

“The church has become a home,” she said. “We have had sad but also very beautiful moments. The Bethelkerk [Bethel church] is for me now a special building, but I am glad that I can get out of it and can continue to build on my future.”

The amnesty was the result of an intense debate within the coalition government over the future of the so-called kinderpardon, a dispensation available to families with children who have lived in the Netherlands for more than five years, but which has been patchily applied.

The Dutch government, led by Mark Rutte of the centre right VVD, includes the progressive D66 and two Christian parties, the relatively moderate CDA and the more conservative Christian Union.

As part of the agreement, the kinderpardon will be taken off the statute books but the head of the Immigration and Naturalisation Service (IND) now has the discretionary authority in such cases rather than a politician.

The government also said that only 500 rather than 750 people a year would be taken from refugee camps run by the UN in war zones.

Luke Korlaar, head of protection at the the UN refugee agency in the Netherlands, said he was “happy for the children” but expressed his “pity that it is at the expense of refugees that need it”.

Theo Hettema, chair of the General Council of the Protestant Church in The Hague, said he was “very grateful for a safe future for hundreds of refugees in the Netherlands” but also expressed his concern about the government’s wider immigration policy.