DUBLIN — Ireland became the first country to legalize same-sex marriage by nationwide popular vote on Saturday.

Around 62% of voters who hit the polls chose to vote yes, while 38% voted no.

See also: Watch this woman propose to her girlfriend after Irish equality vote

In total, 60% of Ireland's more than 3 million eligible voters turned out; of them, more than 1 million people cast votes in favor of the marriage equality referendum. Only one of the country's 43 constituencies had a majority of voters rejecting the referendum.

The history-making marriage equality vote took place on Friday, with official results arriving Saturday night. However, locals took to Irish streets and social media to celebrate what ended up being a clear victory for the "Yes" campaign well before the official count came in.

For the vote, Ireland's electorate was asked to agree or disagree with this statement: "Marriage may be contracted in accordance with law by two persons without distinction as to their sex." In light of the vote, that language will now be added to the Irish constitution.

People celebrate the results of an Irish referendum approving same-sex marriage.

"It's an incredible day that even two years ago we could not have dared to imagine," gay rights activist Rory O'Neill, known by his stage name Panti Bliss, told RTÉ News when results were coming in.

Dublin Castle is the main results center for referendums in Ireland. All of the constituencies around the country send their results to the castle, where the final results were officially announced. Traditionally, only party activists, campaigners, politicians and media are admitted, but in an unprecedented move, the courtyard of Dublin Castle was opened to the public to watch the results come in.

“Happy. Proud to be Irish," Maria Baily Scanlan told Mashable in the courtyard of Dublin Castle. "It’s a good day for Ireland, for all children, for all the different types of families.”

Panti Bliss celebrates with other Yes campaigners in Dublin. Image: EPA/AIDAN CRAWLEY

Ireland has allowed same-sex civil partnerships since 2010, and voters appear to have supported marriage equality for some time. An Irish Times poll conducted last year showed that 71% of people asked would vote for the legalization of same-sex marriage.

Irish political parties backed the Yes campaign, although opposition to the new constitutional amendment came, in part, from the Catholic church. However, support for same-sex marriage in Ireland was so clear on Saturday that prominent "No" campaigner David Quinn conceded defeat on Twitter before the official vote count came in:

Congratulations to the Yes side. Well done. #MarRef — David Quinn (@DavQuinn) May 23, 2015

Many Irish citizens living outside Ireland returned to the country to vote in the historic referendum because absentee ballots were not allowed.

"I think it’s fantastic. It’s great that everyone wanted to get involved," voter Rebecca Kummert told Mashable. "So many people are newly registered to vote and fantastic that they’ve used it. I have friends from 30 countries who came home to vote, so this is a great result."

The No side credited Yes supporters with running a creative, compelling campaign that harnessed the power of social media to mobilize young voters, tens of thousands of whom voted for the first time Friday. They also said a No victory was always unlikely given that all political parties and most politicians backed the legalization of homosexual unions, just five years after parliament approved marriage-style civil partnerships for gay couples.

Additional reporting by The Associated Press