The couple entered into a registered partnership, as the Supreme Court had ruled that same month that the partnership law was in effect. This enabled the American partner to reside in Estonia. Following a ruling by the European Court of Justice in June 2018 relating to the rights of same-sex couples in the European Union, an Estonian court ruled that same-sex couples must be treated the same way as opposite-sex couples in the issuance of residence permits. On June 21, 2019, the Supreme Court ruled in two cases that the refusal to grant a residence permit to a foreign same-sex partner of an Estonian citizen was unconstitutional. The court ruled that the provision preventing the granting of temporary residence permits to same-sex partners registered in Estonia was unconstitutional and invalid in respect of the Aliens Act (). In accordance with the principles of human dignity and equal treatment guaranteed by the Constitution of Estonia, the Supreme Court found that family law also protects the right of people of the same sex to live in Estonia as a family. Same-sex marriage A same-sex marriage was recognised by a court in December 2016. The couple, two men who had originally married in Sweden but now live in Estonia, had their marriage officially registered in late January 2017. Initially, a court in Harju County refused to register their marriage, but the couple appealed the decision. In December, the Tallinn Circuit Court ruled that the marriage must be entered into the Estonian population registry. Much uncertainty followed the ruling, concerning whether the ruling applied universally to all couples or only to this specific case. According to several Estonian jurists and lawyers, whether a same-sex marriage will be recognized must be assessed on a case-by-case basis. Others argue that the Private International Law Act (), the law which applies when the validity of foreign marriages needs to be assessed, does not explicitly prohibit the recognition of same-sex marriages. In March 2017, Martin Helme of the Conservative People's Party, speaking in the Riigikogu, threatened the judges who issued the ruling, saying he wanted their "heads to roll". Many criticised his comments, including President Kersti Kaljulaid, Chief Justice Priit Pikamäe and Speaker of Parliament Eiki Nestor. In November 2017, Archbishop Urmas Viilma of the Estonian Evangelical Lutheran Church argued that the Estonian Constitution should define marriage as between "a man and a woman". This proposal was supported