DUBLIN — Ireland, which seems intent on bucking the illiberal tide in the West, is at it again: As other countries move to tighten restrictions on immigration, the Irish public is overwhelmingly in favor of a proposal to reinstate birthright citizenship.

A proposed law on the subject passed a preliminary vote in the Irish Senate on Wednesday, three days after an opinion poll for the Irish edition of The Sunday Times of London showed that 71 percent of respondents favor birthright citizenship. Nineteen percent were opposed and 10 percent undecided.

Should it be enacted, the proposed law would grant the right to citizenship to any person who is born in Ireland and subsequently lives in the country for three years, regardless of the parents’ citizenship or residency status. It would largely reverse the effect of 2004 referendum in which 79 percent of voters supported the removal of a constitutional provision granting citizenship to anyone born in Ireland.

This remarkable swing in public opinion, at a time when President Trump has called for ending birthright citizenship in the United States, follows a high-profile case in which Eric Zhi Ying Xue, a 9-year-old boy who was born in Ireland, was threatened last month with deportation along with his Chinese mother.