DUBLIN — Ireland voted decisively to repeal one of the world’s more restrictive abortion bans, sweeping aside generations of conservative patriarchy and dealing the latest in a series of stinging rebukes to the Roman Catholic Church.

The surprising landslide, reflected in the results announced on Saturday, cemented the nation’s liberal shift at a time when right-wing populism is on the rise in Europe and the Trump administration is imposing curbs on abortion rights in the United States. In the past three years alone, Ireland has installed a gay man as prime minister and has voted in another referendum to allow same-sex marriage.

But this was a particularly wrenching issue for Irish voters, even for supporters of the measure. And it was not clear until the end that the momentum toward socially liberal policies would be powerful enough to sweep away deeply ingrained opposition to abortion.

“What we have seen today really is a culmination of a quiet revolution that’s been taking place in Ireland for the past 10 or 20 years,” Prime Minister Leo Varadkar said at a counting center in Dublin before the results of Friday’s vote were released, giving an early indication of the final outcome.

