A New York gay couple have spoken of their surprise after receiving a letter of congratulation from President Barack Obama following their wedding.

The president reportedly wrote to the couple four months after their July marriage ceremony.

While it is possible to request letters of congratulation from the White House after weddings, births, adoptions, as well as notable anniversaries and birthdays, it is believed to be the first case of a US president writing to congratulate a gay couple on their marriage.

The letter, dated 8 December, says: “Congratulations to you on this special occasion. Michelle and I hope it is blessed with love, laughter and happiness.

“Your union marks the beginning of a lifelong partnership as you share in the joys of your life together.

“I wish you the very best as you embark on your journey together and hope that your bond grows stronger with each passing year.”

Matt Katz and husband Aaron Lafrenz were among the first gay couples to wed on the day same-sex marriage was legalised in New York this summer.

After posting a photo of the letter to his Facebook profile on Sunday, Katz told Buzzfeed: “I’m not sure why the letter got sent to us. Aaron and I were married on July 24th at Borough Hall.

“However, we had our wedding ceremony on July 23rd at my dad’s house the day before. Maybe word got out that we were outlaws for a day?”

Obama has said he is “working on” his views of gay marriage, backing the autonomy of individual states to decide whether to implement equal marriage laws. He has backed the Respect for Marriage Act, which would void the federal definition of marriage as being between a man and a woman.