Although Arizona does not recognize same-sex marriage, a federal judge granted a gay man favor in seeking death benefits from his spouse who died from cancer last month.

On Friday, U.S. District Judge John Sedwick issued an emergency order requiring Arizona to recognize the marriage between Fred McQuire, 69, and George Martinez. The couple had been together for 45 years before Martinez was diagnosed with pancreatic cancer in June and died in late August.

Over the summer they exchanged vows in Carolina to fulfill Martinez' dying wish. However, after his death, McQuire was unable to receive Social Security and veteran benefits due to Arizona's state ban on gay marriage, reports NBC News.

As a result, attorneys representing McQuire on Friday morning petitioned Judge Sedwick to allow McQuire to be listed as Martinez's spouse on his death certificate. By the afternoon, the judge granted him a brief order, which does not apply to any other gay couple in the state.

"George will be very proud of me being here," said McQuire during the hearing Friday morning, according to AZ Central. "I need to let people know I was married. George was my life partner for over 40 years. We loved each other and he would love to have my name on his death certificate."

On the other hand, an attorney with the Christian-based legal group Alliance Defending Freedom, which represented the state in the hearing, said, "The integrity of the state's marriage definition, which has existed since the state's inception, is of the utmost importance." Attorney James Campbell added that, "That requires the state to preserve its marriage policy. It can't change it, not even for one person."

The Green Valley couple was also part of a larger lawsuit which was filed in March challenging Arizona's definition of marriage as strictly between one man and one woman.