Ireland voted “yes” on gay marriage on Friday, approving a constitutional amendment that made it the first country to legalize same-sex marriage by popular vote.

The amendment was approved 62 percent to 38 percent. By comparison, the past five polls had shown the “yes” side ahead, on average, 64 percent to 23 percent, with 13 percent undecided. So the polls did a pretty good job of projecting the “yes” vote, but most of the undecided voters turned out to vote “no” instead, a reasonably common pattern for ballot propositions of this kind.

What’s more impressive is how quickly Irish opinion on gay rights has changed. The country once had a reputation for being homophobic, and it did not decriminalize homosexuality until 1993. And in a 2006 Eurobarometer poll, only 41 percent of Irish residents say they favored same-sex marriage. That means the pro-gay marriage side gained more than 2 percentage points of support per year to have reached 62 percent now, a rate of change similar to or slightly faster than the United States over the same period.

Which European countries might be next to legalize gay marriage? In the 2006 poll, 12 countries were more supportive of gay marriage than Ireland. They were The Netherlands (82 percent), Sweden (71 percent), Denmark (69 percent), Belgium (62 percent) Luxembourg (58 percent), Spain (56 percent), Germany (52 percent), the Czech Republic (52 percent), Austria (49 percent), France (48 percent), the United Kingdom (46 percent) and Finland (45 percent).

Gay marriage is now legal in eight of those countries, and it will become legal in Finland in 2017.

CORRECTION (May 24, 8:27 p.m.): A previous version of this article incorrectly said same-sex marriage is legal in the Czech Republic.