Maryland Attorney General Douglas F. Gansler. (AP Photo/Cliff Owen)

Attorney General Douglas F. Gansler (D) told national gay-rights activists Friday that Maryland will recognize same-sex marriages performed in Utah during the 17 days they were recently allowed.

This week the U.S. Supreme Court issued a stay on performing gay unions in Utah after a court ruling there struck down a same-sex marriage ban. In between, roughly 1,400 marriage licenses were issued to gay couples.

The governor of Utah has announced that his state will not recognize those unions.

The Human Rights Campaign has been seeking assurances that the marriages in Utah would be recognized in states such as Maryland, where gay nuptials are allowed.

“If any of them were to move to Maryland, we would recognize those marriages as being valid,” Gansler said in an interview Friday afternoon.

In a letter to Chad Griffin, president of the Human Rights Campaign, Gansler, who is running for governor, said “we are witnessing a historic change in how the American people regard same-sex marriage.”

“Maryland has been on the forefront of this change since 2010, when I issued my opinion concluding that same-sex marriages that are valid in the state in which they were performed would be recognized as valid here in Maryland,” Gansler wrote.

That principle was also reflected in the 2012 legislation that legalized same-sex marriages performed in Maryland.

On Friday, U.S. Attorney General Eric H. Holder Jr. announced that same-sex marriages in Utah are considered legal under federal law and are eligible for all federal benefits until further court action.

Gansler is facing a competitive primary in June against Lt. Gov. Anthony G. Brown (D) and Del. Heather R. Mizeur (D-Montgomery).