Daniel Berezowsky and Jaime Chávez Alor met in high school in their native Mexico more than a decade ago, but the two men were not high school sweethearts. They only began dating after reconnecting on Facebook in 2012. After one friend request, not only was the rest history, so to speak, but unbeknownst to them at the time, they were on their way to making history.

Last week, Berezowsky, a communications specialist at human rights organization Shift, and Chávez Alor, a lawyer for the Vance Center for International Justice, became the first gay couple to have a marriage performed outside of Mexico recognized by Mexican law. The consul general of Mexico officiated the marriage at his Manhattan residence before approximately 25 family members and friends of the couple.

“We're happy, because we knew we weren't the first same-sex couple to try to get married here, but we're the first one that was successful," Chávez Alor told NBC News.

Jaime Chavez Alor and Daniel Berezowsky during their wedding ceremony in New York. Joe Curry Photography

Shortly after the two men tied the knot, the Mexican consulate released a congratulatory statement wishing the “happy couple” success and highlighting the relevance of the event, which it said “paves the way for Mexican couples of the same sex who wish to legally join in marriage at an embassy or consulate of our country.”

The marriage is seen as a major victory for Mexicans living abroad who wish to marry a person of the same sex and have their nuptials recognized by their home country.

Berezowsky, 32, and Chávez Alor, 31, who now live in New York City, said the road to their big day was not an easy one. The two men, who are both Mexican citizens, spent more than six months attempting to obtain a marriage license from the General Consulate of Mexico in New York, but they were initially denied. Although same-sex couples can legally marry in Mexico City and several of the country’s 31 states, same-sex marriages are not legal according to Mexico’s federal code.

“We thought it was discriminatory and a violation of our human rights,” Chávez Alor told NBC News. “We had every right to get married.”

So instead of waiting until Mexico legalized same-sex marriage federally or getting married in the U.S. but not having their union recognized by their home country, they decided to fight. The couple filed a legal challenge to the marriage license denial with a federal court in Mexico, and on Oct. 19, the court ruled in their favor.

The decision was not only monumental for the couple — whose Nov. 26 marriage is now legally recognized throughout Mexico — but it paves the way for other same-sex Mexican couples living abroad to get married.

“We thought it was discriminatory and a violation of our human rights. We had every right to get married.” Jaime Chávez

After the historic decision, the couple didn’t waste any time planning their ceremony.

“Everything went so fast,” Chávez Alor said of the wedding planning. “But we were very happy that this was finally happening. After six years of being in a relationship, we knew that this was the step we wanted to take.”

Among those who congratulated the newlyweds was the New York City Mayor’s Office, which shared a post on Facebook calling the marriage a “milestone for global equality” and thanked the men for their “courageous actions in pressing their case for marriage equality.”

“Their persistence will make a meaningful difference for LGBT Mexican immigrants and their families living in New York City and elsewhere,” the post stated. “We are so proud that Daniel and Jaime chose NYC, the host of the world's largest diplomatic community & the birthplace of the modern movement for LGBT rights, for their special day.”

Chávez Alor said he and Berezowsky are “very happy” following their historic marriage “victory,” but he said they now hope it will inspire Mexican lawmakers to view same-sex marriage as a federal issue.

“During past elections, every time candidates were questioned about same-sex marriage, they said that it was a state decision and that it didn’t have relevancy,” Chávez Alor explained. “But this isn’t true, because there are cases like ours. It was very important for us to show that same-sex marriage should be on the federal agenda.”

FOLLOW NBC OUT ON TWITTER, FACEBOOK & INSTAGRAM