Fairness and fear of legal liability convinced New York Gov. David A. Paterson to direct all state agencies to immediately recognize as valid same-sex marriages solemnized outside of New York, the governor said Thursday.

“If I didn’t take this action, I would leave this state open to lawsuits,” Paterson said. “I would leave the state treasury open to monetary damages and I would be discriminating against individuals who are coming here from other jurisdictions who are allowed that right [to marry] — and now are suddenly being denied that right.”